OLECustomControl control (OCX)
The PowerBuilder class OLECustomControl is a container
for OLE custom controls, also known as ActiveX controls or OCXs.
When you create a PowerBuilder OLE custom control container, the
Insert Object dialog prompts you to select the control to insert
in the container. Your choices are the controls that have been registered
in the system registry. If a control is not registered by its install
process, you can register it in the Insert Object dialog box.
The Browser also displays registered controls. Select the
OLE tab of the Browser and double-click OLE Custom Controls.
Properties
In OLE terminology, font information and the display name
are called ambient properties. Ambient properties
provide default information that the custom control can use, if
it is programmed to recognize and use such information.
PowerBuilder does not display text for the control, so it
does not use the font and display name properties directly. If the
control is programmed to recognize ambient properties, it can use
the values PowerBuilder provides when the control displays text
or needs a name to display in a title bar.
OLECustom |
Datatype |
Description |
---|---|---|
String |
A description of the control and/or |
|
String |
A label that briefly describes the control, |
|
AccessibleRole (enumerated) |
Describes what kind of user interface |
|
Alignment (enumerated) |
Specifies the text alignment in the control.
|
|
Long |
Specifies the numeric value of the background |
|
BinaryIndex |
Integer |
Internal use only. |
BinaryKey |
String |
Internal use only. |
Boolean |
Specifies whether the control has a border.
|
|
BorderStyle (enumerated) |
Specifies the style of the border of
|
|
Boolean |
Specifies whether PowerBuilder moves
|
|
Boolean |
Specifies whether the control acts as
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
ClassLongName |
String |
Specifies the long name for the server |
ClassShortName |
String |
Specifies the short name for the server |
String |
Specifies a user-readable name for your |
|
Boolean |
Specifies whether the button-style OLE This property applies only to controls that act like command buttons. Values are:
Editable controls Default behavior can be affected by editable controls on the |
|
Boolean |
Specifies whether PowerBuilder puts the
|
|
String |
Specifies the name of the stock icon When the user drags the control, the icon displays when the control |
|
Boolean |
Specifies whether the control is enabled
|
|
String |
Specifies a typeface name (for example, |
|
Boolean |
Specifies whether a dotted rectangle
|
|
FontCharSet (enumerated) |
Specifies the font character set that |
|
FontFamily (enumerated) |
Specifies the font family (type style)
|
|
FontPitch (enumerated) |
Specifies the pitch (character spacing)
|
|
Integer |
Specifies the height of the control, |
|
IsDragTarget |
Boolean |
Specifies whether data can be dropped
|
Boolean |
Specifies that you want the control to
|
|
Object |
omObject |
Specifies the link information that connects |
String |
Specifies the name of the stock pointer |
|
Integer |
Specifies tab value of the control within |
|
String |
Specifies the tag value assigned to the |
|
Long |
Specifies the color that you want the |
|
Integer |
Specifies the point size that you want |
|
Boolean |
Specifies that you want the control to
|
|
Boolean |
Specifies whether the control is visible.
|
|
Integer |
Specifies the stroke weight that you |
|
Integer |
Specifies the width of the control, in |
|
Integer |
Specifies the X position (the distance |
|
Integer |
Specifies the Y position (the distance |
Events
The PowerBuilder Script painter displays PowerBuilder events
and events defined by the control inserted in the control.
To get information about an event that does not appear in
this list, check the documentation for the control.
OLECustomControl event |
Occurs |
---|---|
When the control is clicked (selected |
|
Immediately before the Open event occurs |
|
When the server application notifies |
|
Immediately after the Close event occurs |
|
When the control is double-clicked (and |
|
When a dragged control is dropped on |
|
When a dragged control enters the control. |
|
When a dragged control leaves the control. |
|
When a dragged control is within the |
|
During OLE automation when an error occurs. |
|
During OLE automation when the OLE server |
|
Just before the control receives focus |
|
When the user presses the F1 key or drags |
|
When the control loses focus (becomes |
|
When an operating environment message |
|
When an OLE Server supporting notifications |
|
When an OLE Server supporting notifications |
|
When the right mouse button is pressed |
Functions
OLECustomControl function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the control |
|
Integer |
Puts the object into drag mode |
|
Integer |
Creates a reference to a context-specific |
|
Integer |
Returns data in a format you specify |
|
Integer |
Returns a pointer to the underlying OLE |
|
Power |
Returns a reference to the name of the |
|
Integer |
Makes the control invisible |
|
Integer |
Moves the control to a specified location |
|
Integer |
Returns the distance of the pointer from |
|
Integer |
Returns the distance of the pointer from |
|
Boolean |
Adds an event to the end of the message |
|
Integer |
Prints the control |
|
Integer |
Releases pointer to underlying OLE object |
|
Integer |
Changes the size of the control |
|
Integer |
Sends data in a caller-supplied format |
|
Integer |
Sets focus to the control |
|
Integer |
Specifies the position of the control |
|
Integer |
Controls automatic redrawing of the control |
|
Integer |
Makes the control visible |
|
Integer |
Triggers a specific event for the control |
|
Object |
Returns the type of the control |