Command Buttons
Command Buttons
Command buttons give a user direct access to commands in your
application.
We've already seen how to associate a command with a button:
button .b -command someCommand
Or, if you want to associate a new command with an existing button,
you can use the configure command:
.b configure -command aNewCommand
All of this is pretty simple.
Our first example simply puts the current time in a label every time
you click the button.
This demonstrates how commands get executed when you click on a
command button: