A Button is a widget with a textual label which can be clicked with the mouse to trigger an action.
- Button(text, action = None, enable = None)
- Initializes the button with the given text. The action
should be a function of no arguments; it will be called when the
mouse is clicked and released again inside the button. If supplied, enable should be a function returning a boolean; it will be used to determine whether the button is enabled.
- Colour in which to display the text while mouse has been clicked but not yet released.
- Colour in which to display the text when the widget is disabled.
- Colour with which to fill the background when the widget is highlighted.
- Colour with which to fill the background when the widget is enabled.
- Colour with which to fill the background when the widget is disabled.
if the button is enabled. If no enable function was supplied in the
constructor, this property may also be assigned in order to enable and
disable the button.