Creating a user control

Demos

Building a Navigation Panel as an ABL User Control
Note: The OpenEdge Release 10.2B demos have not been updated for OpenEdge Release 11.0. Since 10.2B, OpenEdge Architect has been renamed as Progress Developer Studio for OpenEdge. In addition, OpenEdge Release 11.0 includes some feature enhancements and other changes. Despite the differences between 10.2B and 11.0, the demos are still a useful introduction to Progress Developer Studio for OpenEdge.

A user control is a composite control consisting of a container with individual controls that you add to it. You select the controls you need, define their properties and event logic, and save the container and its contents as a single entity that you can add to any form.

  1. Select File > New > ABL User Control.
  2. Enter the appropriate values as described in the New ABL User Control wizard reference help. Only the Package root and Control name fields are required. (The name must begin with a letter; spaces and most non-alphanumeric characters are not allowed.)
  3. After entering the desired values, click OK. Progress Developer Studio for OpenEdge creates a new class file with the same name that you assigned to the control and opens it in a Visual Designer editing window. The Design Canvas displays a blank container with sizing handles that you can drag to define the size and shape of the rectangular container
    Note: You must fully define the behavior and properties of the individual controls in the container at the time that you design the user control. It is not possible to change these characteristics after placing an instance of the user control on a form. You can resize the container after placing it, however.
  4. Add the desired controls to the container and define their properties, data bindings (as necessary), and event logic.
  5. Save the CLS file.
After defining the custom control, you must add it to the Toolbox to make it available for use in OpenEdge GUI for .NET forms.
Note: If you move the CLS file for a user control from its original disk location to a location that is not on the project PROPATH, you must add the new location to the PROPATH. Otherwise, the type is unavailable, and the Visual Designer cannot open the control or any form containing an instance of the control.