PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form Height = 356 Width = 652 DoCreate = .T. AutoCenter = .T. Caption = "Form1" AllowOutput = .F. Name = "Form1" ADD OBJECT pageframe1 AS pageframe WITH ; ErasePage = .T., ; PageCount = 2, ; Top = 10, ; Left = 25, ; Name = "Pageframe1", ; Page1.Caption = "Page1", ; Page1.Name = "Page1", ; Page2.Caption = "Page2", ; Page2.Name = "Page2" ADD OBJECT pageframe2 AS pageframe WITH ; ErasePage = .T., ; PageCount = 2, ; Top = 20, ; Left = 400, ; Width = 200, ; Height = 150, ; Name = "Pageframe2", ; Page1.FontSize = 15, ; Page1.Caption = "Page1", ; Page1.Name = "Page1", ; Page2.Caption = "Page2", ; Page2.Name = "Page2" PROCEDURE Activate ? '------ FORM ACTIVATE -------' ? "PAGEFRAME DEFAULT","Objtoclient" ? OBJTOCLIENT(this.pageframe1.Pages[1],3),"Expected .",this.pageframe1.PageWidth ? OBJTOCLIENT(this.pageframe1.Pages[1],4),"Expected .",this.pageframe1.Pageheight ? OBJTOCLIENT(this.pageframe1.Pages[1],1),OBJTOCLIENT(this.pageframe1.Pages[1],2)," Observe the first value" ? "PAGEFRAME NOT DEFAULT"," BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size" ? OBJTOCLIENT(this.pageframe2.Pages[1],3),"Expected .",this.pageframe2.PageWidth ? OBJTOCLIENT(this.pageframe2.Pages[1],4),"Expected .",this.pageframe2.Pageheight ? OBJTOCLIENT(this.pageframe2.Pages[1],1),OBJTOCLIENT(this.pageframe2.Pages[1],2)," Observe the first value" ENDPROC PROCEDURE Init ? '------ FORM INIT -------' ? "PAGEFRAME DEFAULT","Objtoclient" ? OBJTOCLIENT(this.pageframe1.Pages[1],3),"Expected .",this.pageframe1.PageWidth ? OBJTOCLIENT(this.pageframe1.Pages[1],4),"Expected .",this.pageframe1.Pageheight ? OBJTOCLIENT(this.pageframe1.Pages[1],1),OBJTOCLIENT(this.pageframe1.Pages[1],2)," Observe this" ? "PAGEFRAME NOT DEFAULT"," BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size" ? OBJTOCLIENT(this.pageframe2.Pages[1],3),"Expected .",this.pageframe2.PageWidth ? OBJTOCLIENT(this.pageframe2.Pages[1],4),"Expected .",this.pageframe2.Pageheight ? OBJTOCLIENT(this.pageframe2.Pages[1],1),OBJTOCLIENT(this.pageframe2.Pages[1],2)," Observe this" ENDPROC PROCEDURE Load CLEAR ENDPROC PROCEDURE Paint ? 'Paint' ENDPROC ENDDEFINEObserved output:
------ FORM INIT ------- PAGEFRAME DEFAULT Objtoclient 371 Expected . 371 224 Expected . 224 34 26 Observe this PAGEFRAME NOT DEFAULT BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size 196 Expected . 196 124 Expected . 124 44 401 Observe this Paint ------ FORM ACTIVATE ------- PAGEFRAME DEFAULT Objtoclient 371 Expected . 371 224 Expected . 224 38 26 Observe the first value PAGEFRAME NOT DEFAULT BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size 196 Expected . 196 124 Expected . 124 64 401 Observe the first valueIf you replicate this into a SCX, you have this output.
------ FORM INIT ------- PAGEFRAME DEFAULT Objtoclient 371 Expected . 371 224 Expected . 224 28 1 PAGEFRAME NOT DEFAULT BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size 371 Expected . 196 224 Expected . 104 28 1 Paint ------ FORM ACTIVATE ------- PAGEFRAME DEFAULT Objtoclient 371 Expected . 371 224 Expected . 224 38 26 PAGEFRAME NOT DEFAULT BUG: OBJTOCLIENT return the Page Height and Width relative to the default PageFrame size 196 Expected . 196 104 Expected . 104 64 401