The bindtags Command

A binding tag groups related bindings, and each widget is associated with an ordered set of binding tags. The level of indirection between widgets and bindings lets you group functionality on binding tags and compose widget behavior from different binding tags.

For example, the all binding tag has bindings on <Tab> that change focus among widgets. The Text binding tag has bindings on keystrokes that insert and edit text. Only text widgets use the Text binding tag, but all widgets share the all binding tag. You can introduce new binding tags and change the association of widgets to binding tags dynamically. The result is a powerful and flexible way to manage bindings.

The bindtags command sets or queries the binding tags for ...

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.