亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 121.html

?? Tcl 語言的入門級圖書
?? HTML
字號:
<HTML><TITLE>Widget Characteristics: Focus</TITLE><BODY BGCOLOR="#FFF0E0" VLINK="#0FBD0F" TEXT="#101000" LINK="#0F0FDD">
<A NAME="top"><H1>Focus</H1></A>


<P>  The focus is defined in 
<A HREF="11.2.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/11.2.html">The Tk Way of Thinking</A>.  The purpose of the concept is to
determine which window gets keystroke events.  At one level, the concept is
simple, the unique widget with the focus gets the keystrokes.  Widgets get the
focus when you click the mouse on them or when you use the tab key to cycle
the focus to them.

<P>  There are two important complications:

<OL>
<P> <P><LI> Tk's focus mechanism is different than the window manager's focus
mechanism.  The window manager gives the focus to one of the windows it is
managing in its own way.  Tk gives the focus to at most one widget in any of
its windows to which the window manager has given the focus.  This
section discusses only Tk's part of the focus mechanism.

<P> <P><LI> When a given widget has the focus, some keystroke events are not sent
to it.  This is because some bindings to top-level windows are effective when
any part of the window has the focus and because some bindings are effective
for all keystrokes.

<P>  This was illustrated with the enhanced Caps example of Figure 11.4a.
When the entry widget in that example had the focus, printable characters went
to the entry widget.  Tab keyboard events, however, did not go to the entry
widgets.  Another binding took effect.

<P>  This feature is a part of a mechanism described below in 
<A HREF="NotHere.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/NotHere.html">Bindings</A>.

</OL>
<P> 
<P>  There are other complications but they aren't important unless you want
to change the way in which the focus is assigned to a widget.

<P> Tk's default mouse mechanism for changing the focus is called
<CITE><NAME=#G12.1clcktfcs>click to focus</A></CITE>. There is another common way that GUI systems
change the focus, it is called
<CITE><NAME=#G12.1fcsfllwsms>focus follows mouse</A></CITE>.  The names say it all.  To change Tk so
that it will use the focus-follows-mouse model, execute

<PRE>
<NAME=#Ctkfcsfllwsms>tk_focusFollowsMouse</A>
</PRE>

<P> The Tk library currently has no way to change back to the click-to-focus
model.

<P> Alongside one of these mouse mechanisms for changing the focus is the
keyboard mechanism that uses the Tab key to cycle through a set of widgets that
may accept the focus.  Holding the shift key down when using the Tab key
reverses the cycling direction. Of course, for this mechanism to work, the
binding to Tab key events cannot be altered.
<P> 
<P>  There is a command your scripts can use to assign the focus to a widget.  It
is used this way.

<PRE>
focus <CITE>WIDGET_NAME</CITE>
</PRE>


<P> <P><A NAME="12.1a">
<STRONG>Exercise 12.1a</STRONG> </A><DL><DD>
 
<P>  Revise the script in Figure 11.4a so that Tk will always pass the focus
along to the entry widget. 
<P> <P>
<A HREF="12.8.html#Sol12.1a" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.8.html#Sol12.1a">Solution</A></DL>


<P>  As you have seen by now, Tk provides a visual indication of which widget has
the focus.  This indicator is set up by default for those widgets that get
the focus by default and not for those that do not.  Look in 
<A HREF="12.4.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.4.html">Colors</A>
below for how to change this indicator.
<P> 
<P>  Tk actually determines the focus in a very complex way.  You may wish
to skip the rest of this section on first reading.

<P> Widgets have a <TT><NAME=#S12.1takefocus>-takefocus</A></TT> option to determine whether they will
accept the focus.  When they are visible and this option is true, they can
accept the focus.  The <TT>-takefocus</TT> option  has three possible
values: true, false, and the empty string.  The default tends to be the empty
string.  The value of this option is used inconsistently with different
kinds of widgets and the three ways of letting the user pick the focus:
the Tab key, focus follows mouse, and click to focus.  The next
exercise exhibits some of the inconsistencies.

<P> <P><A NAME="12.1b">
<STRONG>Exercise 12.1b</STRONG> </A><DL><DD>
 Create three button widgets labelled "Default,"
"Takes Focus," and "Doesn't Take Focus" and make sure the value of their
<TT>-takefocus</TT> option matches these labels.  Also create three entry widgets
whose <TT>-takefocus</TT> option likewise takes on the three possible values.  Pack
these widgets so that the two default <TT>-takefocus</TT> values come first, then
the two true values, then the two false values.

<P>  See how the focus changes when you use the Tab key.

<P>  See how the focus changes when you click the left mouse button.

<P>  Execute <TT>tk_focusFollowsMouse</TT> and see how the focus changes
as you move the mouse cursor.  Remember that once you do this you
cannot return to the click-to-focus method.
<P>
<A HREF="12.8.html#Sol12.1b" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.8.html#Sol12.1b">Solution</A></DL>


<P>  Some of the inconsistency you see in doing this experiment can be explained
by saying that if you want to create an application that permits buttons to be
pushed without using the mouse, the Tab mechanism must be able to pass the
focus to buttons.  On the other hand, if the user is pushing buttons with the
mouse, it is probably distracting to see the focus switch when the button is
clicked &#150; unless the focus is following the mouse anyway.

<P>  Another part of the inconsistency can be fixed by noting that widgets
that permit keyboard entry of data have another option that acts a lot
like <TT>-takefocus</TT>.  See below in 
<A HREF="NotHere.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/NotHere.html">Active/Normal/Disabled</A>.

<P>  I do not feel that either of these considerations justifies the complex
inconsistencies that surround Tk's focus mechanism.  Luckily, the issue
does not seem important for most applications.

<!-- Linkbar -->
<P><CENTER><FONT SIZE=2><NOBR>
<STRONG>From</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/tcl/book/home.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/tcl/book/home.html'" tppabs="http://www.mapfree.com/sbf/tcl/book/home.html">Tcl/Tk For Programmers</A><WBR>
<STRONG>Next</STRONG>
<A HREF="12.2.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.2.html">section</A><WBR>
<STRONG>All</STRONG>
<A HREF="12.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.html">sections</A><WBR>
<STRONG>Author</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/mp/jaz/home.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/mp/jaz/home.html'" tppabs="http://www.mapfree.com/mp/jaz/home.html">J. A. Zimmer</A><WBR>
<STRONG>Copyright</STRONG>
<A HREF="copyright.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/copyright.html">Notice</A><WBR>
<P>
<I>Jun 17, 1998</I>
 </NOBR></FONT></CENTER></BODY></HTML>


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲禁片免费| 亚洲国产日韩在线一区模特| 精品少妇一区二区三区 | 欧美久久一区二区| 欧美色图第一页| 欧美午夜精品一区二区蜜桃| 欧美午夜影院一区| 欧美人妖巨大在线| 欧美一区二区久久久| 欧美一区二区三区爱爱| 欧美成人精品高清在线播放 | 国产精品乱人伦| 91精品国产乱| 日韩视频免费观看高清在线视频| 日韩视频免费观看高清完整版在线观看 | 国产成人免费视频网站| 国产成人自拍高清视频在线免费播放| 国产精品白丝jk黑袜喷水| 国产福利不卡视频| 波多野结衣精品在线| 一本一道波多野结衣一区二区| 99久久er热在这里只有精品66| 成人免费视频一区| 91一区二区三区在线播放| 欧美亚洲禁片免费| 精品剧情v国产在线观看在线| 久久精品一区二区三区四区| 国产精品久线在线观看| 亚洲精品乱码久久久久| 午夜精品久久久久久不卡8050| 奇米影视在线99精品| 国产在线精品免费av| proumb性欧美在线观看| 精品视频在线看| 日韩欧美在线观看一区二区三区| 久久久久久久久久美女| 亚洲欧洲国产日本综合| 视频一区二区三区在线| 国产电影一区在线| 欧洲人成人精品| 日韩一区二区三| 国产精品久久久久久久裸模| 亚洲妇女屁股眼交7| 国产精品18久久久久久vr| 91热门视频在线观看| 欧美精品日韩一区| 中文字幕欧美激情| 日韩二区三区在线观看| 国产大陆亚洲精品国产| 欧美午夜精品久久久久久孕妇 | 精品成a人在线观看| 亚洲日本韩国一区| 久久综合综合久久综合| 99精品1区2区| 精品免费视频一区二区| 亚洲中国最大av网站| 国内精品久久久久影院薰衣草| 色天使色偷偷av一区二区| 日韩欧美成人激情| 亚洲综合免费观看高清完整版在线| 精品一区二区三区免费观看| 欧美专区在线观看一区| 国产视频911| 另类小说综合欧美亚洲| 色拍拍在线精品视频8848| 久久综合999| 午夜一区二区三区视频| www.欧美亚洲| 国产亚洲精品7777| 老司机精品视频在线| 欧美在线你懂的| 中文字幕一区二区日韩精品绯色| 捆绑调教美女网站视频一区| 欧美体内she精高潮| 亚洲欧洲成人自拍| 国产精品99久久久久久久vr| 制服.丝袜.亚洲.另类.中文| 亚洲男人天堂一区| 成人av网站大全| 久久综合色8888| 美女视频黄免费的久久| 欧美夫妻性生活| 一区二区三区丝袜| 成人18视频在线播放| 精品久久国产老人久久综合| 日本系列欧美系列| 欧美精品1区2区| 亚洲韩国一区二区三区| 一本久久a久久免费精品不卡| 国产女人水真多18毛片18精品视频| 久久99精品久久只有精品| 欧美精品久久一区二区三区| 亚洲高清不卡在线| 欧美日韩在线直播| 伊人色综合久久天天| 色哟哟在线观看一区二区三区| 欧美国产激情二区三区| 国产福利一区二区三区视频在线 | 欧美日韩黄色影视| 亚洲综合精品自拍| 欧美视频三区在线播放| 亚洲精品日韩专区silk| 91免费看`日韩一区二区| 国产精品久久午夜| av在线不卡观看免费观看| 国产女人aaa级久久久级| 福利一区福利二区| 中文字幕中文乱码欧美一区二区 | 欧美精品777| 日本不卡免费在线视频| 日韩欧美电影一二三| 激情综合网激情| 精品盗摄一区二区三区| 国产精品99久久久久久久vr | 亚洲国产三级在线| 欧美精品在欧美一区二区少妇| 亚洲图片一区二区| 51精品久久久久久久蜜臀| 日韩 欧美一区二区三区| 欧美成人伊人久久综合网| 国产一区二区在线影院| 国产农村妇女毛片精品久久麻豆| 成人自拍视频在线| 一区二区三区日韩精品视频| 欧美日韩精品欧美日韩精品| 日韩成人伦理电影在线观看| 精品国产凹凸成av人网站| 国产在线精品一区二区| 国产精品久久久99| 欧美亚洲综合在线| 欧美a级一区二区| 久久精品网站免费观看| 国产不卡免费视频| 亚洲综合丝袜美腿| 欧美成人性福生活免费看| 丁香网亚洲国际| 亚洲综合丝袜美腿| 日韩欧美久久一区| 成人午夜短视频| 午夜激情综合网| 久久久久国产精品麻豆| 色婷婷精品久久二区二区蜜臀av| 亚洲成a人在线观看| 欧美精品一区二区不卡| 一本在线高清不卡dvd| 久久精品国产亚洲a| 最新国产成人在线观看| 欧美一二三四区在线| 成人美女视频在线观看18| 亚洲成人精品一区| 亚洲国产精品精华液2区45| 在线视频一区二区免费| 黄页网站大全一区二区| 亚洲精品乱码久久久久久| 欧美成人女星排名| 在线免费视频一区二区| 国产精品一区二区无线| 亚洲国产视频直播| 欧美国产成人精品| 日韩一级免费观看| 91黄色激情网站| 国产一区二区美女| 亚洲国产日产av| 国产清纯白嫩初高生在线观看91 | 亚洲欧美韩国综合色| 日韩午夜精品电影| 91黄视频在线| 国产 欧美在线| 青青草国产精品97视觉盛宴 | 国内精品伊人久久久久影院对白| 亚洲精品乱码久久久久久黑人| xf在线a精品一区二区视频网站| 色综合久久久久久久| 国产精品99久久久久久宅男| 日韩电影在线一区二区| 一区二区三区四区在线播放| 国产欧美视频在线观看| 欧美xxxx老人做受| 欧美日韩一级黄| 日本韩国视频一区二区| 成人激情视频网站| 国产精品 日产精品 欧美精品| 日韩国产一区二| 一区二区三区在线看| 国产精品亲子伦对白| 久久综合国产精品| 精品国产凹凸成av人网站| 91精品国产黑色紧身裤美女| 欧美日韩综合在线| 欧美在线播放高清精品| 91在线你懂得| 99re这里只有精品首页| 成人黄色电影在线 | 久久久影视传媒| 日韩欧美一区二区在线视频| 欧美日本在线观看| 欧美日韩精品一区二区三区蜜桃 | 亚洲一区在线播放| 亚洲女性喷水在线观看一区| 中文字幕一区二区三|