📄 ch21_03.htm
字号:
-command => sub {exit})->pack;</pre></blockquote><p>Applicable widgets: Button, Checkbutton, Label, Menubutton,Optionmenu, Radiobutton.</p></dd><dt><b><tt class="literal">-insertbackground =></tt> <em class="replaceable">color</em></b></dt><dd><a name="INDEX-2820" />Sets the color of the insert cursor.Applicable widgets: Canvas, Entry, Text.</p></dd><dt><b><tt class="literal">-insertborderwidth =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2821" />Sets the width of the insertcursor's border. Applicable widgets: Canvas, Entry,Text.</p></dd><dt><b><tt class="literal">-insertofftime =></tt> <em class="replaceable">milliseconds</em></b></dt><dd><a name="INDEX-2822" />Defines the amount of time the insertcursor is "off." Applicablewidgets: Canvas, Entry, Text.</p></dd><dt><b><tt class="literal">-insertontime =></tt> <em class="replaceable">milliseconds</em></b></dt><dd><a name="INDEX-2823" />Defines the amount of time the insertcursor is "on." Applicable widgets:Canvas, Entry, Text.</p></dd><dt><b><tt class="literal">-insertwidth =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2824" />Thewidth of the insert corner (default = 2 pixels). Applicable widgets:Canvas, Entry, Text.</p></dd><dt><b><tt class="literal">-justify =></tt> <em class="replaceable">side</em></b></dt><dd><a name="INDEX-2825" />Justifies text against the specifiedside. <em class="replaceable"><tt>side</tt></em> can be <tt class="literal">left</tt>,<tt class="literal">right</tt>, or <tt class="literal">center</tt>. Applicablewidgets: Button, Checkbutton, Entry, Label, Menubutton, Optionmenu,Radiobutton.</p></dd><dt><b><tt class="literal">-padx =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2826" />Adds extra space to left and right ofthe widget inside the widget edge. Applicable widgets: Button,Checkbutton, Label, Menubutton, Optionmenu, Radiobutton, Text.</p></dd><dt><b><tt class="literal">-pady =></tt> <em class="replaceable">amount</em></b></dt><dd>Adds extra space to top and bottom of the widget inside the widgetedge. Applicable widgets: Button, Checkbutton, Label, Menubutton,Optionmenu, Radiobutton, Text.</p></dd><dt><b><tt class="literal">-relief =></tt> <em class="replaceable">type</em></b></dt><dd><a name="INDEX-2827" />Changes the type of edges drawn aroundthe widget. Values for <em class="replaceable"><tt>type</tt></em> are<tt class="literal">flat</tt>, <tt class="literal">groove</tt>,<tt class="literal">raised</tt>, <tt class="literal">ridge</tt>, and<tt class="literal">sunken</tt>. Applicable widgets: Button, Canvas,Checkbutton, Entry, Frame, Label, Listbox, Menu, Menubutton,Optionmenu, Radiobutton, Scale, Scrollbar, Text, Toplevel.</p></dd><dt><b><tt class="literal">-selectbackground =></tt> <em class="replaceable">color</em></b></dt><dd><a name="INDEX-2828" />Determines the background color ofselected text in the entry widget. Applicable widgets: Canvas, Entry,Listbox, Text.</p></dd><dt><b><tt class="literal">-selectborderwidth =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2829" />Determines the width of the selectionhighlight's border. Applicable widgets: Canvas,Entry, Listbox, Text.</p></dd><dt><b><tt class="literal">-selectforeground =></tt> <em class="replaceable">color</em></b></dt><dd><a name="INDEX-2830" />Determines the text color of selectedtext in the entry widget. Applicable widgets: Canvas, Entry, Listbox,Text.</p></dd><dt><b><tt class="literal">-state =></tt> <em class="replaceable">state</em></b></dt><dd><a name="INDEX-2831" />Sets the state of responsiveness ofthe widget. Values for <em class="replaceable"><tt>state</tt></em> are<tt class="literal">normal</tt>, <tt class="literal">disabled</tt>, and<tt class="literal">active</tt>. (<tt class="literal">disabled</tt> makes it notrespond.) Applicable widgets: Button, Checkbutton, Entry, Menubutton,Optionmenu, Scale, Text.</p></dd><dt><b><tt class="literal">-takefocus =></tt> <em class="replaceable">focus</em></b></dt><dd><a name="INDEX-2832" />Determines whether the widgetgets focus. Values for <em class="replaceable"><tt>focus</tt></em> are<tt class="literal">0</tt> (the widget will never get the focus),<tt class="literal">1</tt> (the widget always gets the focus), and the nullstring ("") (which lets theapplication decide). Applicable widgets: Button, Canvas, Checkbutton,Entry, Frame, Label, Listbox, Menu, Menubutton, Optionmenu, Scale,Scrollbar, Text, Toplevel.</p></dd><dt><b><tt class="literal">-underline =></tt> <em class="replaceable">n</em></b></dt><dd><a name="INDEX-2833" />Underlines the<em class="replaceable"><tt>n</tt></em>th character in the text string. Allowskeyboard input via that character when the widget has the focus.Applicable widgets: Button, Checkbutton, Label, Menubutton,Optionmenu, Radiobutton.</p></dd><dt><b><tt class="literal">-width =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2834" />Width of the widget, represented incharacters if text is displayed, or as a screen distance if an imageor bitmap is displayed. Applicable widgets: Button, Canvas,Checkbutton, Frame, Label, Listbox, Menubutton, Optionmenu,Radiobutton, Scale, Scrollbar, Text, Toplevel.</p></dd><dt><b><tt class="literal">-wraplength =></tt> <em class="replaceable">amount</em></b></dt><dd><a name="INDEX-2835" />Defines the maximum amount oftext to be displayed on one line. Applicable widgets: Button,Checkbutton, Label, Menubutton, Optionmenu, Radiobutton.</p></dd><dt><b><tt class="literal">-xscrollcommand =></tt> <em class="replaceable">callback</em></b></dt><dd><a name="INDEX-2836" />Assigns a callback to use when scrollingback and forth. Applicable widgets: Canvas, Entry, Listbox, Text.</p></dd><dt><b><tt class="literal">-yscrollcommand =></tt> <em class="replaceable">callback</em></b></dt><dd><a name="INDEX-2837" /><a name="INDEX-2838" /><a name="INDEX-2839" /><a name="INDEX-2840" />Determines a command to run whenscrolled in the vertical direction. Applicable widgets: Canvas,Listbox, Text.</p></dd></dl><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch21_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch21_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">21.2. Geometry Managers</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">21.4. The Button Widget</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -