>*#DEFINE WORKAROUND1 >*#DEFINE WORKAROUND2 > > >#IFDEF WORKAROUND2 > #UNDEFINE WORKAROUND1 >#ENDIF > >PUBLIC oform1 > >oform1=NEWOBJECT("form1") >oform1.Show > >DEFINE CLASS form1 AS form > > Height = 391 > Width = 556 > Autocenter = .T. > Caption = "Use spinners for move the page2's listbox. Red dotted box show it" > DrawStyle = 2 > ForeColor = RGB(255,0,0) > BindControls = .F. > > ADD OBJECT timer1 AS timer WITH ; > Interval = 600 > > ADD OBJECT spinner1 AS spinner WITH ; > Left = 42, ; > Top = 8, ; > Width = 78, ; > ControlSource = "THISFORM.Pageframe1.Page2.Lbox2.Left" > > > ADD OBJECT spinner2 AS spinner WITH ; > Left = 149, ; > Top = 8, ; > Width = 78, ; > ControlSource = "THISFORM.Pageframe1.Page2.Lbox2.Top" > > ADD OBJECT label1 AS label WITH ; > Caption = "Left", ; > Top = 12, ; > Width = 22 > > ADD OBJECT label2 AS label WITH ; > Caption = "Top", ; > Left = 123, ; > Top = 12, ; > Width = 23 > > ADD OBJECT label3 AS label WITH ; > Caption = "Width", ; > Left = 230, ; > Top = 12, ; > Width = 33 > > > ADD OBJECT label4 AS label WITH ; > Caption = "Height", ; > Left = 347, ; > Top = 12, ; > Width = 38 > > > ADD OBJECT spinner3 AS spinner WITH ; > Left = 266, ; > Top = 8, ; > Width = 78, ; > ControlSource = "THISFORM.Pageframe1.Page2.Lbox2.Width" > > > ADD OBJECT spinner4 AS spinner WITH ; > Left = 388, ; > Top = 8, ; > Width = 78, ; > ControlSource = "THISFORM.Pageframe1.Page2.Lbox2.Height" > > > ADD OBJECT pageframe1 AS pageframe WITH ; > PageCount = 2, ; > Top = 37, ; > Left = 7, ; > Width = 546, ; > Height = 352 > > PROCEDURE PageFrame1.page1.Init > this.AddObject("list1","listbox") > WITH this.list1 > FOR K=1 TO ALANGUAGE(AL,1) > .AddItem(AL[m.k]) > next > .Visible = .Move(51,38,134,226) > ENDWITH > =BINDEVENT(this.List1,"click",thisform,"list1_Click") > > PROCEDURE PageFrame1.page2.Init > this.AddObject("lbox2","listbox") > WITH this.lbox2 > .Move(0,156,131,162) >#IFNDEF WORKAROUND2 > .Visible = .T. >#ELSE > =BINDEVENT(this.lbox2,"uienable",thisform,"list2_uienable") >#ENDIF > ENDWITH > > PROCEDURE Init > this.BindControls = .T. > > PROCEDURE list2_uienable(YES) > AEVENTS(AV,0) > AV[1].Visible = m.YES > ENDPROC > > PROCEDURE list1_Click > WAIT WINDOW "Click" NOWAIT TIMEOUT 3 > ENDPROC > > PROCEDURE Refresh > NODEFAULT > WITH THISFORM.Pageframe1 > > .Page1.REFRESH >#IFDEF WORKAROUND1 > .Page2.LBox2.REFRESH >#ELSE > .Page2.REFRESH >#ENDIF > this.themes = .t. > Form::Draw > > lb=.Page2.LBox2 > > thisform.Box(OBJTOCLIENT(m.lb,2),OBJTOCLIENT(m.lb,1),OBJTOCLIENT(m.lb,2)+OBJTOCLIENT(m.lb,3)-1,OBJTOCLIENT(m.lb,1)+OBJTOCLIENT(m.lb,4)-1) > ENDWITH > ENDPROC > > > PROCEDURE Paint > thisform.timer1.Reset > ENDPROC > > > PROCEDURE spinner1.InteractiveChange > this.Value = this.value > thisform.Refresh > ENDPROC > > > PROCEDURE spinner2.InteractiveChange > this.Value = this.value > thisform.Refresh > ENDPROC > > > PROCEDURE spinner3.InteractiveChange > this.Value = this.value > thisform.Refresh > ENDPROC > > > PROCEDURE spinner4.InteractiveChange > this.Value = this.value > thisform.Refresh > ENDPROC > > PROCEDURE timer1.Timer > thisform.refresh > ENDPROC > >ENDDEFINE >