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 > >ENDDEFINEthe controlsource is updated BEFORE the valid event, when you try to leave the spinner.
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 SPINNER::SETFOCUS && force the ControlSource update thisform.refresh() ENDPROC procedure destroy clear events endproc ENDDEFINESetfocus reset the SelStart position, this is a bug.