Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spinner refuses to increase
Message
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114924
Message ID:
01114928
Views:
11
This is not a bug. This happens becuase you bind the control to a form property. IntreactiveChange not change the value of that property, this will be happens after Valid. But refreshing the form you rollback the value of the spinner to value of
thisform.nEffe

If you change:
PROCEDURE spinner1.InteractiveChange
        thisform.nEffe = this.Value
	thisform.refresh()
ENDPROC
all will works as you expect. I not tested furter what happens with validation.

>This piece of code demonstrates a spinner that refuses to increase or decrease. The crucial part appears to be the instruction to refresh the form in the interactivechange method.
>
>Who has a clue? Is it a bug? Or am I the one who is doing something really stupid here.
>
>
local ox
>ox = createobject( 'form1' )
>ox.visible = .t.
>read events
>
>DEFINE CLASS form1 AS form

>
>	DoCreate = .T.
>	Caption = "Form1"
>	nEffe = 0
>	Name = "Form1"
>
>	ADD OBJECT spinner1 AS spinner WITH ;
>		Height = 24, ;
>		Left = 198, ;
>		Top = 72, ;
>		Width = 120, ;
>		ControlSource = "thisform.nEffe", ;
>		Name = "Spinner1"
>
>	PROCEDURE spinner1.InteractiveChange
>		thisform.refresh()
>	ENDPROC
>
>	procedure destroy
>		clear events
>	endproc
>
>ENDDEFINE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform