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.
|
OLECustomControl property |
Datatype |
Description |
|---|---|---|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Alignment (enumerated) |
Specifies the text alignment in the control. Values Center! Justify! Left! Right! |
|
|
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. Values TRUE — Control has a border. FALSE |
|
|
BorderStyle (enumerated) |
Specifies the style of the border of the control. StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to TRUE — Control moved to top. FALSE |
|
|
Boolean |
Specifies whether the control acts as the Cancel TRUE — FALSE — Control is |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
ClassLongName |
String |
Specifies the long name for the server application |
|
ClassShortName |
String |
Specifies the short name for the server application |
|
String |
Specifies a user-readable name for your OLE |
|
|
Boolean |
Specifies whether the button-style OLE control is This property Values are: TRUE — Control is FALSE — Control is not the Editable Default behavior can be affected by |
|
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Control can be FALSE — Control cannot be |
|
|
String |
Specifies a typeface name (for example, arial or |
|
|
Boolean |
Specifies whether a dotted rectangle (the focus TRUE — Control framed when it has FALSE — Control not framed when it has |
|
|
FontCharSet (enumerated) |
Specifies the font character set that you want the |
|
|
FontFamily (enumerated) |
Specifies the font family (type style) that you AnyFont! Decorative! Modern! Roman! Script! Swiss! |
|
|
FontPitch (enumerated) |
Specifies the pitch (character spacing) that you Default! Fixed! Variable! |
|
|
Integer |
Specifies the height of the control, in |
|
|
IsDragTarget |
Boolean |
Specifies whether data can be dropped on the TRUE — Data can be dropped on FALSE — Data cannot be dropped on |
|
Boolean |
Specifies that you want the control to display text TRUE — Text is FALSE — Text is not italic. |
|
|
Object |
omObject |
Specifies the link information that connects the |
|
String |
Specifies the name of the stock pointer or the file |
|
|
Integer |
Specifies tab value of the control within the |
|
|
String |
Specifies the tag value assigned to the |
|
|
Long |
Specifies the color that you want the control to |
|
|
Integer |
Specifies the point size that you want the control |
|
|
Boolean |
Specifies that you want the control to underline TRUE — Text is FALSE — Text is not |
|
|
Boolean |
Specifies whether the control is visible. Values TRUE — Control is visible. FALSE |
|
|
Integer |
Specifies the stroke weight that you want the |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
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 or |
|
|
Immediately before the Open event occurs in the |
|
|
When the server application notifies the control |
|
|
Immediately after the Close event occurs in the |
|
|
When the control is double-clicked (and possibly |
|
|
When a dragged control is dropped on the |
|
|
When a dragged control enters the |
|
|
When a dragged control leaves the |
|
|
When a dragged control is within the |
|
|
During OLE automation when an error |
|
|
During OLE automation when the OLE server generates |
|
|
Just before the control receives focus (and |
|
|
When the user presses the F1 key or drags the |
|
|
When the control loses focus (becomes |
|
|
When an operating environment message occurs that |
|
|
When an OLE Server supporting notifications sends a |
|
|
When an OLE Server supporting notifications sends a |
|
|
When the right mouse button is pressed in the |
Functions
|
OLECustomControl function |
Datatype returned |
Description |
|---|---|---|
|
String |
Returns the name assigned to the |
|
|
Integer |
Puts the object into drag mode |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
Integer |
Returns data in a format you specify from an OLE |
|
|
Integer |
Returns a pointer to the underlying OLE |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Makes the control invisible |
|
|
Integer |
Moves the control to a specified |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Integer |
Prints the control |
|
|
Integer |
Releases pointer to underlying OLE |
|
|
Integer |
Changes the size of the control |
|
|
Integer |
Sends data in a caller-supplied format to an OLE |
|
|
Integer |
Sets focus to the control |
|
|
Integer |
Specifies the position of the control in the |
|
|
Integer |
Controls automatic redrawing of the control after |
|
|
Integer |
Makes the control visible |
|
|
Integer |
Triggers a specific event for the control and |
|
|
Object |
Returns the type of the control |