glydget

Button

class Button(text='Label', action=None)

Bases: glydget.label.Label

The Button widget is usually displayed as a push button with a text label and is used to execute an action when it is activated.

Example usage:

def click(button):
    print 'You clicked me !'
button = Button(text='Click me', action=click)
button.show()
window.push_handlers(button)

Known sub-classes:

Properties

Button.action Action to executed when button is activated.

Properties Details

Button.action

Action to executed when button is activated.

Type:function(button)