Determines whether the OLE Button will behave as a standard push button or as a checkbox (aka toggle button). By default the control will act as a standard push button. When used as a checkbox you can specify whether it will have two or three states.

Usage

Set_Property(OLECtrlEntID, "OLE.ButtonType", OptionValue)

Values

OptionValue can be set to one of the following valid options:

ValueAbbr.Description
NormalNCreates a standard push button
ToggleTGCreates a two state toggle button (Checked and Unchecked)
TriStateTSCreate a three state toggle button (Checked, Unchecked, and Undetermined)

Default: Normal

Remarks

OpenInsight allows two and three state checkbox controls but only two state graphical checkbox controls (i.e. checkbmps). Using the ButtonType property, the SRP OLE Button can behave like a two or three state graphical checkbox.

When used as a graphical checkbox, 'checked' buttons will appear as if the button was clicked. Buttons that have an 'undetermined' state will have the same appearance as if being 'checked' but the caption will be grayed out:

Use the State property to determine what state (i.e. checked, unchecked, or undetermined) the graphical checkbox is in.

Graphics can be added to the OLE button by using the Icon property. Normally this property is used to provide an image that appears within the borders of the button control while still using the button's current style. However, if you wish to customize the entire appearance of the button then use the OwnerDrawn value of the Style property. This works similar to how OpenInsight supports images on pushbuttons by allowing you use a multi-framed image to control how each state (i.e. at rest, clicked, disabled, etc.) will appear.

Example

// Set the button to be a toggle button 
Set_Property(@Window:".OLE_BUTTON", "OLE.ButtonType", "Toggle") 

// Alternatively the abbreviation for "Toggle" can be used as follows: 
* Set_Property(@Window:".OLE_BUTTON", "OLE.ButtonType", "TG") 

// Set the button to be a tri-state button 
Set_Property(@Window:".OLE_BUTTON", "OLE.ButtonType", "TriState") 

// Alternatively the abbreviation for "TriState" can be used as follows: 
* Set_Property(@Window:".OLE_BUTTON", "OLE.ButtonType", "TS") 

See Also

StateIconStyle

  • No labels