Button

A Button is a simple component which generates an event when pressed.

Button Looks

The following looks are available:

0

Default Button. A plain button

1

Blank Button. A blank style button

2

Tool Button. A tool-style button

3

Window Control

4

Edge Button: Lower Right

5

Edge Button: Upper Left

Button Properties

Standard Properties:
caption, class, enabled, graphic, height, left, look, parent, proto, sizeHControl, sizeVControl, top, version, visible, width.

height, width: There is a bug: A Button which is the child of a Table component may appear very small.
sizeHControl, sizeVControl: only SIZE_AS_NEEDED and SIZE_AS_SPECIFIED values are supported.

cancel integer (0-1)
Set this property to 1 to mark this button as the Cancel button for a dialog. If the user presses the Esc key, this button will generate a _pressed() event. Note that this property does not cause the dialog to actually close when the button is tapped or the Esc key is pressed. For that, use the closeDialog integer.

closeDialog integer (0-1)
If this property is set to one, then pressing this button will result in the closing of any dialog box that the button is in. (The dialog box's visible property will be set to zero.) The dialog box will close after the button's _pressed() event handler, if any, executes.

default integer (0-1)
If this Button is in a dialog box and its default property is 1, then it will be the default action for that dialog. Setting a button's default value will not take effect until the next time the button goes from being invisible to being visible (i.e., its visible property changes from zero to one).

destructive integer (0-1)
If this Button destroys (i.e., irrevocably changes) data, set this property to one. This ensures that this Button will never be a dialog's default Button.

Button Events

_pressed()

_pressed( self AS button )

This event is generated when the user clicks the Button.

Pass:

self button
The Button handling the event.

Button Actions

None