next up previous contents index
Next: bind Up: Event handling Previous: Event handling   Contents   Index

command


Table 2: Classes with a command property and their descriptions
widget argument description
button - called when the button is clicked
check-button value report the value when the button is clicked
listbox selection a list of the selected indices (0 for first) whenever the listbox is clicked
scale value whenever the value is changed, called with the new value
spinbox value whenever the value of the spinbox is changed by the buttons, the new one is returned


With the command property a function for handling the default event type of widgets can be specified. This can be done with the :command initarg or the command accessor (settable) for those widgets. The widgets that support the command property are listed in table 2. The first column lists the widgets, the second which arguments the function is passed (if any) and the third one gives a brief description about when the event happens and what the arguments contain.


next up previous contents index
Next: bind Up: Event handling Previous: Event handling   Contents   Index
Peter Herth 2006-01-29