Class: FormButton

qui.forms.FormButton(id, caption, styleopt, backgroundColoropt, backgroundActiveColoropt, foregroundColoropt, iconopt, defopt, cancelopt, callbackopt, …args)

A form button.

Constructor

new FormButton(id, caption, styleopt, backgroundColoropt, backgroundActiveColoropt, foregroundColoropt, iconopt, defopt, cancelopt, callbackopt, …args)

Parameters:
Name Type Attributes Description
id String

button identifier

caption String

button caption

style String <optional>

button style:

  • "foreground"
  • "interactive"
  • "highlight"
  • "danger"
  • "colored"
backgroundColor String <optional>

custom background color (ignored unless style is "colored")

backgroundActiveColor String <optional>

custom background active color (ignored unless style is "colored")

foregroundColor String <optional>

custom foreground color (ignored unless style is "colored")

icon qui.icons.Icon <optional>

an optional button icon

def Boolean <optional>

indicates that the button is the default form button (defaults to false)

cancel Boolean <optional>

indicates that the button is the cancel form button (defaults to false)

callback function <optional>

called when button is pressed; will be called with the form as argument

args * <repeatable>

parent class parameters

Mixes In:
Source:

Methods

disable()

Disable the button.

Source:

enable()

Enable the button.

Source:

focus()

Focus the button.

Source:

getCaption() → {String}

Return the button caption.

Source:
Returns:
Type
String

getForm() → {qui.forms.Form}

Return the owning form.

Source:
Returns:
Type
qui.forms.Form

getId() → {String}

Return the button identifier.

Source:
Returns:
Type
String

handlePressed(form)

Button press handler.

Parameters:
Name Type Description
form qui.forms.Form
Source:

isCancel() → {Boolean}

Tell if the button is the form cancel button.

Source:
Returns:
Type
Boolean

isDefault() → {Boolean}

Tell if the button is the default form button.

Source:
Returns:
Type
Boolean

isFocused() → {Boolean}

Tell if the button is focused or not.

Source:
Returns:
Type
Boolean

setCaption(caption)

Update the button caption.

Parameters:
Name Type Description
caption String
Source:

setForm(form)

Set the owning form.

Parameters:
Name Type Description
form qui.forms.Form
Source: