tk/wm focusmodel

(tk/wm 'focusmodel #<widget> ?active|passive?)
If active or passive is supplied as an optional argument to the command, then it specifies the focus model for #<widget>. In this case the command returns an empty string.

If no additional argument is supplied, then the command returns the current focus model for #<widget>.

An active focus model means that #<widget> will claim the input focus for itself or its descendants, even at times when the focus is currently in some other application.

Passive means that #<widget> will never claim the focus for itself: the window manager should give the focus to #<widget> at appropriate times. However, once the focus has been given to #<widget> or one of its descendants, the application may re-assign the focus among #<widget>'s descendants.

The focus model defaults to passive, and Tk's focus command assumes a passive model of focusing.


© Author | Home | Sitemap