Article ID: 147726
Article Last Modified on 2/8/2000
** AddButtons Method
PARAMETERS nButton_Number
* This parameter is the total number of buttons for the option group
Thisform.lockscreen=.T.
This.ButtonCount = nButton_Number
FOR i = 2 TO This.ButtonCount
* Position it directly to the right of the previous one
This.Buttons(i).Left = This.Buttons(i-1).Left +;
This.Buttons(i-1).Width
* Compute its caption
length= LEN(This.Buttons(1).Caption)
cStart_Title=left(This.Buttons(1).Caption, length-1)
This.Buttons(i).Caption = cStart_Title + alltrim(Str(i))
This.Buttons(i).Visible = .T.
This.Buttons(i).Top = This.Buttons(1).Top
NEXT i
This.AutoSize=.T.
Thisform.Lockscreen=.F.
Thisform.NewOption1.addbuttons(4)
Additional query words: VFoxWin
Keywords: kbcode KB147726