PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
Autocenter = .T.
ADD OBJECT optiongroup1 AS optiongroup WITH ;
AutoSize = .T., ;
ButtonCount = 4, ;
Value = 1, ;
Height = 84, ;
Left = 12, ;
Top = 76, ;
Width = 71,;
Option1.Caption = "Top", ;
Option1.Height = 17, ;
Option1.Left = 5, ;
Option1.Top = 5, ;
Option1.Width = 61, ;
Option1.Name = "Option1", ;
Option2.Caption = "Bottom", ;
Option2.Height = 17, ;
Option2.Left = 5, ;
Option2.Top = 24, ;
Option2.Width = 61, ;
Option2.Name = "Option2", ;
Option3.Caption = "Left", ;
Option3.Height = 17, ;
Option3.Left = 5, ;
Option3.Top = 43, ;
Option3.Width = 61, ;
Option3.Name = "Option3", ;
Option4.Caption = "Right", ;
Option4.Height = 17, ;
Option4.Left = 5, ;
Option4.Top = 62, ;
Option4.Width = 61, ;
Option4.Name = "Option4"
ADD OBJECT check1 AS checkbox WITH ;
Top = 4, ;
Left = 12, ;
AutoSize = .T., ;
Caption = "TabStyle"
ADD OBJECT check2 AS checkbox WITH ;
Top = 24, ;
Left = 12, ;
AutoSize = .T., ;
Caption = "TabStretch"
ADD OBJECT check3 AS checkbox WITH ;
Top = 44, ;
Left = 12, ;
AutoSize = .T., ;
Caption = "ResizeMovePages"
ADD OBJECT pf AS myPageFrame WITH ;
PageCount = 6, ;
Top = 50, ;
Left = 130, ;
Height = 150,;
Width = 150
PROCEDURE Init
WITH thisform.pf.Pages[1]
.AddObject("text1",[textbox])
.text1.Visible = .text1.Move(51,36,80)
ENDWITH
this.Check1.ControlSource = "thisform.pf.TabStyle"
this.Check2.ControlSource = "thisform.pf.TabStretch"
this.Check3.ControlSource = "thisform.pf.ResizeMovePages"
PROCEDURE optiongroup1.Refresh
this.Value=thisform.pf.TabOrientation+1
ENDPROC
PROCEDURE optiongroup1.Valid
thisform.pf.TabOrientation=this.Value-1
ENDPROC
ENDDEFINE
DEFINE CLASS myPageFrame AS pageframe
ResizeMovePages = .T.
HIDDEN PROCEDURE TabOrientation_assign
LPARAMETERS tabOrientation
IF m.this.ResizeMovePages OR EMPTY(m.this.PageCount)
THIS.TabOrientation = m.tabOrientation
ELSE
PRIVATE left,top
STORE m.this.Top + OBJTOCLIENT(this.Pages[1],1) TO top
STORE m.this.Left + OBJTOCLIENT(this.Pages[1],2) TO left
THIS.TabOrientation = m.tabOrientation
this.Move( m.Left -OBJTOCLIENT(this.Pages[1],2);
, m.Top -OBJTOCLIENT(this.Pages[1],1))
ENDIF
ENDPROC
HIDDEN PROCEDURE TabStretch_Assign
LPARAMETERS tabStretch
IF m.this.ResizeMovePages OR EMPTY(m.this.PageCount)
THIS.TabStretch = m.tabStretch
ELSE
PRIVATE left,top
STORE m.this.Top + OBJTOCLIENT(this.Pages[1],1) TO top
STORE m.this.Left + OBJTOCLIENT(this.Pages[1],2) TO left
THIS.TabStretch = m.tabStretch
this.Move( m.Left -OBJTOCLIENT(this.Pages[1],2);
, m.Top -OBJTOCLIENT(this.Pages[1],1))
ENDIF
ENDPROC
ENDDEFINE