⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 button.html

📁 是TCL的另外一个编译(解释)器
💻 HTML
字号:
<HTML><HEAD><TITLE>Button</TITLE></HEAD><BODY BGCOLOR=white><DL><DT><I><A HREF="#descr">NAME</A></I></DT><DD><B>Button</B> - Button widget with enhanced options</DD></DL><DL><DT><I>CREATION</I></DT><DD><A HREF="#descr"><B>Button</B></A> <I>pathName</I> ?<I>option value...</I>?</DD></DL><DL><DT><I>STANDARD OPTIONS</I></DT><DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TR></TABLE></DD></DL><DL><DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT><DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0><TR><TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR><TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR><TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR><TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR><TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TR><TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR><TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR></TABLE></DD></DL><DL><DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT><DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A> <I>option</I></DD><DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?</DD><DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A></DD></DL><BR><HR WIDTH="100%"><BR><B><A NAME="descr"></A>DESCRIPTION</B><BR><P>Button widget extends the Tk button with new options.<A HREF="DynamicHelp.html">DynamicHelp</A> options,a new relief style, callback for <B>arm</B>/<B>disarm</B>, and<B>repeatdelay</B>/<B>repeatinterval</B> options has been added.</P><BR><HR WIDTH="50%"><BR><B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR><DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT><DD>Specifies a Tcl command to associate with the Button when mouse button 1 is pressed over theButton. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive integer,this command is repeatedly called if mouse pointer is over the Button and until mousebutton 1 is released.</DD></DL><DL><DT><A NAME="-command"><B>-command</B></A></DT><DD>Specifies a Tcl command to associate with the Button.  This commandis typically invoked when mouse button 1 is released over the Buttonwindow.</DD></DL><DL><DT><A NAME="-default"><B>-default</B></A></DT><DD>Specifies one of three states for the default ring: <B>normal</B>, <B>active</B>,or <B>disabled</B>. In active state, the button is drawn with the platform specificappearance for a default button. In normal state, the button is drawn with the platformspecific appearance for a non-default button, leaving enough space to draw the defaultbutton appearance. The normal and active states will result in buttons of the same size.In disabled state, the button is drawn with the non-default button appearance withoutleaving space for the default appearance. The disabled state may resultin a smaller button than the active state.</DD></DL><DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT><DD>Specifies a Tcl command to associate with the Button when mouse button 1 is released.This command is called even if pointer is not over the Button, and always beforethe command specified by <B>command</B> option.It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and<B>repeatinterval</B>.</DD></DL><DL><DT><A NAME="-height"><B>-height</B></A></DT><DD>Specifies a desired height for the Button.If an image or bitmap is being displayed in the Button then the value is inscreen units;for text it is in lines of text.If this option isn't specified, the Button's desired height is computedfrom the size of the image or bitmap or text being displayed in it.</DD></DL><DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT><DD>Text for dynamic help. If empty, no help is available for this widget.See also <A HREF="DynamicHelp.html">DynamicHelp</A>.</DD></DL><DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT><DD>Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.See also <A HREF="DynamicHelp.html">DynamicHelp</A>.</DD></DL><DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT><DD>Variable to use when <B>helptype</B> option is <I>variable</I>.See also <A HREF="DynamicHelp.html">DynamicHelp</A>.</DD></DL><DL><DT><A NAME="-name"><B>-name</B></A></DT><DD>Specifies a standard name for the button. If the option <B>*<I>name</I>Name</B> isfound in the resources database, then <B>text</B> and <B>underline</B> optionsare extracted from its value.</DD></DL><DL><DT><A NAME="-relief"><B>-relief</B></A></DT><DD>Specifies the 3-D effect desired for the widget. Acceptable values are standard values forbutton relief (<B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>, <B>solid</B>, and <B>groove</B>) and <B>link</B>, which specifies that button relief is <B>flat</B> when pointeris outside the button and <B>raised</B> when pointer is inside.</DD></DL><DL><DT><A NAME="-state"><B>-state</B></A></DT><DD>Specifies one of three states for the Button:  <B>normal</B>, <B>active</B>,or <B>disabled</B>.  In normal state the Button is displayed using the<B>foreground</B> and <B>background</B> options.  The active state istypically used when the pointer is over the Button.  In active statethe Button is displayed using the <B>activeforeground</B> and<B>activebackground</B> options.  Disabled state means that the Buttonshould be insensitive:  the default bindings will refuse to activatethe widget and will ignore mouse button presses.In this state the <B>disabledforeground</B> and<B>background</B> options determine how the Button is displayed.</DD></DL><DL><DT><A NAME="-underline"><B>-underline</B></A></DT><DD>Specifies the integer index of a character to underline in the label of the button.0 corresponds to the first character of the text displayed, 1 to the next character,and so on.<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevelof the Button to call Button::<B>setfocus</B>.</DD></DL><DL><DT><A NAME="-width"><B>-width</B></A></DT><DD>If an image or bitmap is being displayed in the Button then the value is inscreen units;for text it is in characters.If this option isn't specified, the Button's desired width is computedfrom the size of the image or bitmap or text being displayed in it.</DD></DL><HR WIDTH="50%"><BR><B><A NAME="wc">WIDGET COMMAND</A></B><BR><DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A> <I>option</I></DT><DD>Returns the current value of the configuration option given by <I>option</I>.<I>Option</I> may have any of the values accepted by the creation command.</DD></DL><DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?</DT><DD>Query or modify the configuration options of the widget. If no <I>option</I> is specified,returns a list describing all of the available options for <I>pathName</I>.If <I>option</I> is specified with no <I>value</I>, then the command returns a listdescribing the one named <I>option</I> (this list will be identical to the correspondingsublist of the value returned if no <I>option</I> is specified). If one ormore <I>option-value</I> pairs are specified, then the command modifies the given widgetoption(s) to have the given value(s); in this case the command returns an empty string.<I>Option</I> may have any of the values accepted by the creation command.Read-only options are not be modified.</DD></DL><DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A></DT><DD>If Button <B>state</B> is not disabled, this invoke the commands of the Button.Button is redisplayed with active color and sunken relief, and<B>armcommand</B> is called. Then Button is redisplayed withnormal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>are called.<P><B>invoke</B> is called when Button has input focus and user press the space bar.</DD></DL></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -