next up previous
Next: Destroying widgets Up: An introduction to Previous: Creating widgets

Changing a widget

What exactly did we tell Tk with the previous command? When the button was created, a new command was made with the same name as the button. This command can be used to change things of the button after it has been created. .b configure tells Tk we want to change some option of the button named .b. The -command option is the option that tells Tk what to do when that particular button is pressed. Other options can change the text in the button, change the background color, change the dimensions and a lot more.



SE Praktikum
Tue Aug 13 13:33:30 MET DST 1996