Gambas Documentation - /comp/gb.gtk/button

/comp/gb.gtk/button

# Button (gb.gtk)

This class implements a push button control.

A push button can display text, a picture, or both.

One button inside a window can be the Default button. Pressing the RETURN key will activate the button automatically.

One button inside a window can be the Cancel button. Pressing the ESC key will activate the button automatically.

This class inherits Control.
This class is
Creates a new push button control.
creatable
.

Properties | Methods | Events
--- | --- | ---

Action AutoResize
Returns or sets the background color used by the control.
Background
Returns or sets if the control has a border.
Border
Indicates if the button is activated when the ESC key is pressed.
Cancel
This is a synonymous of the Text property.
Caption
Use this property for assigning a custom cursor to a control.
Cursor
Indicates if the button is activated when the RETURN key is pressed.
Default
Indicates that the control is in design mode.
Design
Returns or sets if a control accepts drops.
Drop
Indicates that the control is enabled.
Enabled
Returns or sets if a control will expand if included in a container that arranges its contents.
Expand
Returns or sets the font used to draw text in the control.
Font
Returns or sets the foreground color used by the control.
Foreground
H Handle HasFocus Height Hovered Id Ignore Left
Returns or sets the appearence of the cursor when it points inside the control.
Mouse
Name Next NoTabFocus Parent
Returns or sets the picture shown into the button.
Picture
PopupMenu Previous Proxy ScreenX ScreenY Tag
Returns or sets the text displayed in the button.
Text
ToolTip Top Tracking
Sets this property to TRUE to activate the button.
Value
Visible W Width Window X Y

Delete Drag Grab Hide Lower Move MoveScaled Raise Refresh Reparent Resize ResizeScaled SetFocus Show

Raised when the user clicks on the button.
Click
DblClick Drag DragLeave DragMove Drop Enter GotFocus KeyPress KeyRelease Leave LostFocus Menu MouseDown MouseDrag MouseMove MouseUp MouseWheel