class Button(Control)

A Button is a momentary-action pushbutton, invoking an action when it is clicked.

Constructors

Button(title)

Creates a generic pushbutton with the given title.

Properties

title
Title string to display inside the button.

style
One of 'normal', 'default' or 'cancel'. Setting this to 'default' or 'cancel causes the button to take on the appearance of a default button or a cancel button respectively, according to platform conventions. (This property only affects the appearance of the button, it does not automatically make the button respond to keyboard commands.)

Action Properties

action
Action to perform when the button is clicked. See Actions.

Methods

activate()
Animates a simulation of the button being pressed momentarily, and then invokes its action.