OLE controls - modifying/retrieving at run time

An OLE control can have many properties, some of which may be unique to that control type. Each property has an identifying name, which can be used to retrieve or amend the property value.

To retrieve or amend a property, enclose the property name in quotes:

current_value = ole_ctrl_id->”property_name

ole_ctrl_id->”property_name” = new_value

Complex properties may be modified or retrieved using the syntax:

ole_ctrl_id->”Property1” ->”Property2

Standard properties supported by Sculptor, such as width, height, style and palette, are accessed by means of the standard syntax - the property name is NOT enclosed in quotes.

EXAMPLE

OleCal->width = 40

RELATED TOPICS

Modifying a property at run time

Retrieving a property at run time


Arrays

Properties can be arrays of values. In these cases, Sculptor supports the following extended syntax to reference a specific element:

ole_ctrl_id->”property_name” [subscript[, subscript] …]

Some OLE controls take string arguments as subscripts, so in these cases the subscript can be another object, a quoted string or a text field.


Extended properties

Some OLE controls that are standard in Sculptor can also be accessed as normal OLE control properties. Most OLE controls support the following properties, where appropriate:

ole_ctrl_id->”Name

Read-only; text. The OLE control name.

ole_ctrl_id->”Parent

Read-only; object. The container object (source of ambient properties).

ole_ctrl_id->”Default

Read/write; TRUE | FALSE. Equivalent to the WS_DEFAULT_BUTTON style. Used only with controls that act like buttons.

ole_ctrl_id->”Cancel

Read/write; TRUE | FALSE. Equivalent to the WS_CANCEL_BUTTON style. Used only with controls that act like buttons.

ole_ctrl_id->”Visible

Read/write; TRUE | FALSE. The opposite of the WS_INVISIBLE style. Changing this property is equivalent to using the hide or show command.


RELATED TOPICS

OLE controls