![]() | The Button component offers a facility to cause an action to happen. When a button is "pushed", i.e. the mouse is clicked once while the cursor is over a button, the push action logic for that button is executed. Typically, the code in this section performs an action that depends on various other parameters that are established through other components in the same window. |
Hint: Always validate that it is valid to undertake the action that is encoded in the push action logic. Such validation can be done at the start of the code for this event, or (more windows-like) by causing the button to be grayed out while the condition(s) for safe execution are not met.
The events that are recognized for components of the type Button are: Create, Destroy, Enter, Exit, Push, gotFocus, help, lostFocus and select.
The default property for a button is Title.
The property list for a button is:
Property Name (MSM-Workstation) | Property Name (MWAPI) | Default Value | Value Range |
---|---|---|---|
Active | ACTIVE | Boolean value | |
CanContain | 0 | Boolean value | |
Cancel | CANCEL | Boolean value | |
Container | Free text | ||
Message | ZMESSAGE | Free text | |
Name | Name of component (current window) | ||
NextControl | NEXTG | Name of component | |
Picture | RESOURCE | External resource | |
Pointer | PTYPE | Pointer (extended) | |
PosLeft | POS | Positive numeric value | |
PosTop | POS | Positive numeric value | |
PosUnits | POS | Unit Specification | |
SizeHeight | SIZE | 12 | Positive numeric value |
SizeUnits | SIZE | Unit Specification | |
SizeWidth | SIZE | 40 | Positive numeric value |
TFontBold | TFSTYLE | Boolean value | |
TFontFace | TFFACE | Font face | |
TFontItalic | TFSTYLE | Boolean value | |
TFontSize | TFSIZE | Font size | |
TFontUline | TFSTYLE | Boolean value | |
Title | TITLE | [Title] | Free text |
Type | TYPE | BUTTON | Type of component |
Units | UNITS | Unit Specification | |
Visible | VISIBLE | Boolean value | |
Go back to the alphabetic list of components.