SimpleButton:
Filter:
ServerTools/Classes (extension) | GUI

SimpleButton
ExtensionExtension

a simple button with a title and an action

Description

Size is automatic based on the size of the title string.

Class Methods

.new

Arguments:

layout

the parent view, FlowView or window

title
action

a function to execute when the button is pressed

bounds

nil = autosizes, number = minWidth, Rect = bounds, Point = width @ height

font

Returns:

this

.viewClass

private: differentiates between the SimpleLabel implementation in the superclass

Returns:

GUI.button

Instance Methods

.action

set a new action

Arguments:

argAction

.label

Arguments:

title

set a new title string

.color

set the text color

Arguments:

color

.background

set the background color

Arguments:

color

Examples

Note that a parent view is not needed.