Button Class

The Button class is a subclass of the Control class and inherits all of the properties and methods defined in the Control and Window classes.

The user selects a command button to begin, interrupt, or end a process. When selected, a command button appears as though it was pushed in, and may also be called a push button. To display text on a command button, set its caption property. A user can always choose a command button by clicking it.

The Button class has the following variations, which are controlled by the style property.

A button is drawn with a border only when it has focus or it is the default button.

The Button control is drawn using the current Windows theme that is in use, unless the currently active JADE skin defines the button look and feel. The exception to this is any button that has the button backColor value set to any color other than the default. In this case, the button is drawn in the JADE style of earlier releases.

When a Button control is skinned and at least one of the skin images is 32‑bit (which supports transparency), the control is treated as though it is transparent; that is, the control is painted on its parent without the area being erased with the effective value of the backColor property. Instead, the parent shows through any transparent areas of the images (for rounded corners, for example). In addition, any semi‑transparent parts of the images are anti‑aliased with the parent image so that they are displayed with smooth corners over any background color.

For a summary of the constants, properties, and events defined in the Button class, see "Button Class Constants", "Button Properties", and "Button Events", in the following subsections.