Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Button Class Reference

Inherits Control.

List of all members.


Detailed Description

This widget is a push button with a text or bitmap label.

Until assigned, the size of it fits its contents plus a border.

The main button type is a text button, which you assign using the caption and #formatCaption methods. Other methods modify this appearance; bordered puts a darker border around the button (commonly used with default buttons), flat makes the button flat instead of 3D if possible, alignLeft and alignRight modify the horizontal position of the text in its space, and alignTop modifies the vertical position of the text.

These are the supported dispatchers:


Public Member Functions

 this (Control parent)
 Register with the parent and create the button.

void caption (char[] text)
 Change the textual caption in the button.

void bordered (bit value)
 If set, this takes a darker border, indicating it's the default.

void flat (bit value)
 If set, this button is flat, instead of 3d.

void alignLeft (bit value)
 If set, the text inside the button is aligned to the left border; otherwise it is centered.

void alignRight (bit value)
 If set, the text inside the button is aligned to the right border; otherwise it is centered.

void alignTop (bit value)
 If set, the text inside the button is aligned to the top; otherwise it is vertically centered.

bit pushed ()
 Return whether the button is pushed down.

void pushed (bit value)
 Set whether the button is pushed down.

void recalculate ()
 Perform size esimate recalculation.


Public Attributes

Dispatcher onClick
 Dispatched when the button is clicked upon.

Dispatcher onDClick
 Dispatched when the button is double-clicked upon; if this is empty, onClick is used instead.


Member Function Documentation

void Button.caption chartext  []  ) 
 

Change the textual caption in the button.

Text where & is followed by a character is interpreted specially to underline that character, and binds it to have the same action as clicking on the button.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:51 2003 for dig by doxygen 1.3.2