class controls.Button(Label)

A Button is a piece of text which can be clicked with the mouse to trigger an action.

Constructor

Button(text, font = resource.default_font, action = None)
Initializes the button with the given text, font and action. The action should be a callable object of no arguments. It will be called when the mouse is clicked and released again inside the button.

Attributes

highlight_color
Colour in which to display the text while mouse has been clicked but not yet released.

---