1tk_focusNext(n)              Tk Built-In Commands              tk_focusNext(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       tk_focusNext,  tk_focusPrev,  tk_focusFollowsMouse - Utility procedures
9       for managing the input focus.
10

SYNOPSIS

12       tk_focusNext window
13
14       tk_focusPrev window
15
16       tk_focusFollowsMouse
17_________________________________________________________________
18
19

DESCRIPTION

21       tk_focusNext is a utility procedure used for  keyboard  traversal.   It
22       returns  the  ``next''  window  after window in focus order.  The focus
23       order is determined by the stacking order of windows and the  structure
24       of  the  window hierarchy.  Among siblings, the focus order is the same
25       as the stacking order, with the lowest window being first.  If a window
26       has  children,  the  window  is visited first, followed by its children
27       (recursively), followed by its next sibling.  Top-level  windows  other
28       than window are skipped, so that tk_focusNext never returns a window in
29       a different top-level from window.
30
31       After computing the next window,  tk_focusNext  examines  the  window's
32       -takefocus  option  to  see  whether  it  should  be  skipped.   If so,
33       tk_focusNext continues on to the next window in the focus order,  until
34       it eventually finds a window that will accept the focus or returns back
35       to window.
36
37       tk_focusPrev is similar to tk_focusNext except that it returns the win‐
38       dow just before window in the focus order.
39
40       tk_focusFollowsMouse  changes the focus model for the application to an
41       implicit one where the window under the mouse gets  the  focus.   After
42       this  procedure  is  called, whenever the mouse enters a window Tk will
43       automatically give it the input focus.  The focus command may  be  used
44       to  move  the focus to a window other than the one under the mouse, but
45       as soon as the mouse moves into a new window the  focus  will  jump  to
46       that window.  Note: at present there is no built-in support for return‐
47       ing the application to an explicit focus model;  to do this you'll have
48       to write a script that deletes the bindings created by tk_focusFollows‐
49       Mouse.
50
51

KEYWORDS

53       focus, keyboard traversal, top-level
54
55
56
57Tk                                    4.0                      tk_focusNext(n)
Impressum