Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

call value within spinner

Status
Not open for further replies.

misulica

Programmer
Feb 8, 2003
43
RO
I use a spinner control to select numbers from 1 to 9.
Please tell me how can I "call" a value from this spinner to use it into a math formula.
Thanks
 
The value property of the Spinner, here is an example:
Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
       ADD OBJECT spinner1 AS spinner WITH ;
		Height = 25, ;
		Left = 120, ;
		SpinnerHighValue =   9.00, ;
		SpinnerLowValue =   1.00, ;
		Top = 72, ;
		Width = 145, ;
		Value = 1, ;
		Name = "Spinner1"
	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 132, ;
		Left = 144, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Click for value", ;
		Name = "Command1"
	PROCEDURE command1.Click
		MESSAGEBOX("The value of the spinner is "+TRANSFORM(thisform.spinner1.value))
	ENDPROC
ENDDEFINE
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Simply put:

ThisForm.Text1.Value = ;
ThisForm.Spinner1.Value + ;
ThisForm.Spinner2.Value
Dave S. [cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top