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.

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.