Setting up the custom control

The PowerBuilder custom control container has properties that apply to any ActiveX control. The ActiveX control itself has its own properties. This section describes the purpose of each type of property and how to set them.

PowerBuilder properties

For OLE custom controls, PowerBuilder properties have two purposes:

StepsTo modify the PowerBuilder properties for the custom control:

  1. Double-click the control, or select Properties from the control’s pop-up menu.

    The OLE Custom Control property sheet displays.

  2. Give the control a name that is relevant to your application. You will use this name in scripts. The default name is ole_ followed by a number.

  3. Specify values for other properties on the General property page and other pages as appropriate.

  4. Click OK when you are done.

NoteDocumenting the control Put information about the ActiveX control you are using in a comment for the window or in the control’s Tag property. Later, if another developer works with your window and does not have the ActiveX control installed, that developer can easily find out what ActiveX control the window was designed to use.

ActiveX control properties

An ActiveX control usually has its own properties and its own property sheet for setting property values. These properties control the appearance and behavior of the ActiveX control, not the PowerBuilder container.

StepsTo set property values for the ActiveX control in the control:

  1. Select OLE Control Properties from the control’s pop-up menu or from the General property page.

  2. Specify values for the properties and click OK when done.

The OLE control property sheet might present only a subset of the properties of the ActiveX control. You can set other properties in a script.

For more information about the ActiveX control’s properties, see the documentation for the ActiveX control.