Adding Controls to Forms with the Class Browser
See Also
You can add controls from the Class Browser while designing or running a form.
To add controls to a form or container
-
In the Form Designer, open the form.
-
In the Class Browser, open the class library file containing the class of the object you want to add to the form.
-
From the Class list, select the class name, and then drag and drop the class icon on the form. The class icon is located above the Class list.
To view the class for a control on a form or in a container
-
In the Form Designer, select the control.
-
From the Tools menu, choose Class Browser. The Class Browser opens and displays the class of the control you selected on the form.
You can design your forms so that you can add objects of a class from the Class Browser on the form while it is running. You might want to design a form class that has this feature as one of its properties.
To add objects on a running form or a container on a form
-
Run the form.
-
Open the Class Browser and view the class list containing the class of object you want to add to the form.
-
Select the class you want and drag the class icon from the Class Browser to the form.
-
A new object appears on the form based on the class you selected from the Class Browser.
Tip You can also add an instance of the selected class to any container by positioning the mouse pointer over the container and entering the following line of code in the Command window:
_oBrowser.FormAddObject(SYS(1270))
To view the class for a control on a running form
-
Set the focus to the control.
-
From the Tools menu, choose Class Browser. The Class Browser evaluates
_SCREEN.ActiveForm.ActiveControl
and displays the class of the control you selected on the form.