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:
-
To specify appearance
and behavior of the container, as you do for any controlYou can specify position, pointer, and drag-and-drop settings,
as well as the standard settings on the General property page (Visible,
Enabled, and so on). -
To provide default information that the ActiveX
control can useFont information and the display
name are called ambient properties in OLE
terminology. PowerBuilder does not display text for the ActiveX control,
so it does not use these properties directly. If the ActiveX control is
programmed to recognize ambient properties, it can use the values PowerBuilder
provides when it displays text or needs a name to display in a title
bar.
To modify the PowerBuilder properties for the
custom control:
-
Double-click the control,
or select Properties from the control’s pop-up menu.The OLE Custom Control property sheet displays.
-
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. -
Specify values for other properties on the General
property page and other pages as appropriate. -
Click OK when you are done.
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.
To set property values for the ActiveX control
in the control:
-
Select OLE Control Properties from the
control’s pop-up menu or from the General property page. -
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.