## Tcl9.0.3/Tk9.0.3 Documentation > Tk Commands > focusNext

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

tk_focusNext, tk_focusPrev, tk_focusFollowsMouse — 入力の注目の管理の為の便利な手続函数 Utility procedures for managing the input focus.

### 構文 SYNOPSIS

tk_focusNext window
tk_focusPrev window
tk_focusFollowsMouse

### 説明 DESCRIPTION

tk_focusNext は鍵盤巡視の為に使われる手続函数である｡注目の順序での window の “次” の窓を返す｡注目の順序は窓の棚の順序と窓の階層構造によって定まる｡兄弟の仲で､注目の順序は窓の棚の順序と同じであり､下層の方が先になる｡もし窓が子供を有すると､先に窓に訪れ次に子供に向かう(再帰的に)､その後次の兄弟に向かう｡ window 以外の頂上水準の窓は飛越され､ window からは異なる頂上水準の窓は tk_focusNext は返さない｡ tk_focusNext is a utility procedure used for keyboard traversal. It returns the “next” window after window in focus order. The focus order is determined by the stacking order of windows and the structure of the window hierarchy. Among siblings, the focus order is the same as the stacking order, with the lowest window being first. If a window has children, the window is visited first, followed by its children (recursively), followed by its next sibling. Top-level windows other than window are skipped, so that tk_focusNext never returns a window in a different top-level from window.

tk_focusNext は､次の窓を算出した後､それを飛越すか否かを見る為に窓の -takefocus 指示項目を調べる｡もし､飛越すなら､最終的に注目を受入れる窓を見付けるか､ window に戻るまで､ tk_focusNext は注目の順序に従って次の窓について続ける｡ After computing the next window, tk_focusNext examines the window's -takefocus option to see whether it should be skipped. If so, tk_focusNext continues on to the next window in the focus order, until it eventually finds a window that will accept the focus or returns back to window.

tk_focusPrev は注目の順序内の window の前の窓を返すことを除いて tk_focusNext と似ている｡ tk_focusPrev is similar to tk_focusNext except that it returns the window just before window in the focus order.

tk_focusFollowsMouse は応用譜に関する注目の型を､マウスの下にある窓が暗黙のもとに注目を得る様式に変更する｡この手続函数が呼ばれた後は､何時であれ､マウスが窓にはいると Tk は自動的に入力の注目を与える｡ focus 命令は､注目をマウスがある窓以外の窓に移動するかもしれないが､マウスが新しい窓に入るや否や注目はその窓に飛び込むことになる｡ tk_focusFollowsMouse changes the focus model for the application to an implicit one where the window under the mouse gets the focus. After this procedure is called, whenever the mouse enters a window Tk will automatically give it the input focus. The focus command may be used to move the focus to a window other than the one under the mouse, but as soon as the mouse moves into a new window the focus will jump to that window.

註意: 現在の所､応用譜が注目の明示的型に戻る組込み手続函数は運用されていない; それを行うには､使用者が tk_focusFollowsMouse によって作成された束縛を取除く記述譜を書かねばならない｡ Note that at present there is no built-in support for returning the application to an explicit focus model; to do this you will have to write a script that deletes the bindings created by tk_focusFollowsMouse.

### KEYWORDS

focus, keyboard traversal, top-level
Copyright © 1994 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.