Building an external visual user object

On the PB Object tab page of the New dialog box, if you select External Visual and click OK, the User Object painter for external visual user objects opens.

StepsTo build an external visual user object:

  1. In the Properties view, click the Browse button next to the LibraryName box.

  2. In the Select Custom Control DLL dialog box, select the DLL that defines the user object and click OK.

  3. In the Properties view, enter the following information, as necessary, and click OK:

    • The class name registered in the DLL

      Information about the class name is usually provided by the vendor of the purchased DLL.

    • Text in the Text box

      This will be displayed only if the object has a text style property.

    • Display properties (border and scroll bars)

    • Decimal values for the style bits associated with the class

      Information about style bits is usually provided by the vendor of the purchased DLL. PowerBuilder will OR these values with the values selected in the display properties for the control.

  4. Declare any functions, structures, or variables you need to declare for the user object.

    You can declare functions, structures, and variables for the user object in the Script view. Information about functions is usually provided by the vendor of the purchased DLL.

  5. Declare any needed events for the user object.

    For information about user events, see “Communicating between a window and a user object”.

  6. In the Script view, create and compile the scripts for the user object.

    For more information on events associated with external visual user objects, see “Events in user objects”.

  7. Save the user object.

    See “Saving a user object”.