Link to home
Start Free TrialLog in
Avatar of LimMH
LimMH

asked on

vfp how to add check box dynamically to a form

Hi,

How do I add check box dynmically to a form?
Can it be done from the form init?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of LimMH
LimMH

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pavel Celba
Yes, when you insert following code to Form's Init event then Checkbox appears:

THISFORM.AddObject("CheckBoxObjectName","Checkbox")

WITH THISFORM.CheckBoxObjectName
  .Visible = .T.
  .Caption = "MyNewCheckbox"
  .Top = 20
  .Left = 30
  .Value = 1
  * etc.
ENDWITH
You are too fast... :-)