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!

spinner problem

Status
Not open for further replies.

misulica

Programmer
Feb 8, 2003
43
RO
I have a database with products.On the sell form i can pick one product(whose name appear in a textbox and his quantity in another textbox).I need a control to operate on that quantity (let's say i sell 5 pieces).You gave me the idea to use a spinner button from whom i can select(let's say from 1 to 9) the number of the sold pieces(e.g. 5).I'm a new user of VFP and i didn't get any help from MSDN library (the subject is insufficient approached) so please give me the code needed to do it.
Many thanks
 
You pick the value of the spinner from the value property.
put the following in a program and run it to see how its done.
Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	Top = 0
	Left = 0
	Height = 132
	Width = 284
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	ADD OBJECT spinner1 AS spinner WITH ;
		Height = 25, ;
		Left = 72, ;
		SpinnerHighValue =   9.00, ;
		SpinnerLowValue =   1.00, ;
		Top = 36, ;
		Width = 133, ;
		Name = "Spinner1"
	PROCEDURE spinner1.Valid
		messagebox(transform(this.value))
	ENDPROC
ENDDEFINE
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top