>>this.Parent.spnQuantity.visible = (this.Value = 0) >>this.Parent.Parent.pgfFixedQtyPerMembership.Enabled = this.Value = 8 >>IF this.Value = 8 >> this.Parent.Parent.ActivePage = this.Parent.Parent.pgfFixedQtyPerMembership.PageOrder >>endif>>
>PUBLIC oForm as Form >oForm = CREATEOBJECT('TestForm') >oForm.Show(2) >RETURN > >DEFINE CLASS TestForm as Form > AutoCenter = .T. > > ADD OBJECT pgfTest as PageFrame WITH ; > Anchor = 15, PageCount = 5, Top = 50 > > PROCEDURE Init > LOCAL lnButton, lcButton, loButton > FOR lnButton = 1 TO This.pgfTest.PageCount > lcButton = 'Button' + TRANSFORM(m.lnButton) > This.AddObject(m.lcButton, 'myButton') > loButton = GETPEM(Thisform,m.lcButton) > WITH loButton as CommandButton > .Move(55*m.lnButton,5,50,24) > .Visible = .T. > ENDWITH > ENDFOR > > WITH This.pgfTest > .Page5.PageOrder = 1 > .Page1.PageOrder = 2 > .Page4.PageOrder = 3 > .Page2.PageOrder = 4 > .Page2.Enabled = .F. > ENDWITH > ENDPROC >ENDDEFINE > >DEFINE CLASS myButton as CommandButton > PROCEDURE Click > LOCAL lcPage, loPage as Page > lcPage = STRTRAN(This.Name,'Button','Page') > loPage = GETPEM(Thisform.pgfTest,m.lcPage) > IF m.loPage.Enabled = .F. > m.loPage.Enabled = .T. > ENDIF > Thisform.pgfTest.ActivePage = m.loPage.PageOrder > ENDPROC >ENDDEFINE >>