MSM-Workstation
Components

Button

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 ValueValue Range
ActiveACTIVE Boolean value
CanContain 0Boolean value
CancelCANCEL Boolean value
Container  Free text
MessageZMESSAGE Free text
Name  Name of component (current window)
NextControlNEXTG Name of component
PictureRESOURCE External resource
PointerPTYPE Pointer (extended)
PosLeftPOS Positive numeric value
PosTopPOS Positive numeric value
PosUnitsPOS Unit Specification
SizeHeightSIZE12Positive numeric value
SizeUnitsSIZE Unit Specification
SizeWidthSIZE40Positive numeric value
TFontBoldTFSTYLE Boolean value
TFontFaceTFFACE Font face
TFontItalicTFSTYLE Boolean value
TFontSizeTFSIZE Font size
TFontUlineTFSTYLE Boolean value
TitleTITLE[Title]Free text
TypeTYPEBUTTONType of component
UnitsUNITS Unit Specification
VisibleVISIBLE Boolean value

Go back to the alphabetic list of components.