Button Gadgets
- Last UpdatedOct 30, 2024
- 1 minute read
When you press a button gadget (control button) it will usually display a child form or invoke a call-back - typically a PML Form method.
Buttons have a tag-name or pixmap which is shown within the button rectangle. The tag, pixmap, call-back, and child form are all optional.
For further information about pixmaps, refer to Gadgets that Support Pixmaps.
For example:
button .SubForm 'More . . .' FORM !!ChildForm
button .SubForm pixmap /filename FORM !!ChildForm
button .Calculate 'Calculate' CALLBACK
'!this.CallbackFunction()'
You can specify the width of the independently of any tag text string it contains using the WIDTH syntax. You can also define its height with the HEIGHT syntax, allowing you to define textual BUTTONs taller than a single character in height.
For example:
Button .btn1 |reject selection| at ... width 10 height 1.5
Note:
The BUTTON's tag is always center-aligned within the define area.