How to: Add Controls to Forms with the Class Browser

JavaScript Editor js editor     Web development 



Main Page

You can add controls from the Class Browser while designing or running a form.

To add controls to a form or container

  1. In the Form Designer, open the form.

  2. In the Class Browser Window, open the class library file containing the class of the object you want to add to the form.

  3. From the Class list, select the class name, and then drag 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

  1. In the Form Designer, select the control.

  2. 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

  1. Run the form.

  2. Open the Class Browser and view the class list containing the class of object you want to add to the form.

  3. Select the class you want and drag the class icon from the Class Browser to the form.

  4. 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

  1. Set the focus to the control.

  2. 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.

See Also



JavaScript Editor js editor     Web development