O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Native Buttons and Scrollbars

Buttons, menus, and scrollbars are native widgets on Windows and Macintosh. This goes a long way to providing your applications with a native look. The bindings on the text and entry widgets were also tuned to match platform standard bindings. See page 332 for an example of the same Tk program on all platforms.

Buttons on all platforms support a -default attribute, which has three values: active, normal, and disabled. The active state displays as a default button. The normal state displays like a regular button, but leaves room for the highlight used in the active state. The disabled state, which is the default, may be smaller. You still need to program a key binding that invokes the button.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required