home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Tk::options - Standard options supported by widgets and their manipulation</TITLE>
- <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::options - Standard options supported by widgets and their manipulation</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <UL>
-
- <LI><A HREF="#creation options: widget name and class">Creation options: Widget Name and Class</A></LI>
- <LI><A HREF="#reconfigurable options">Reconfigurable options</A></LI>
- </UL>
-
- <LI><A HREF="#see also">SEE ALSO</A></LI>
- <LI><A HREF="#keywords">KEYWORDS</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Tk::options - Standard options supported by widgets and their manipulation</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <P> <EM>$value</EM> = <EM>$widget</EM>-><STRONG>cget</STRONG>('<EM>-option</EM>');</P>
- <P> <EM>$widget</EM>-><STRONG>configure</STRONG>(<EM>-option</EM>=><EM>value</EM> ?,<EM>-option</EM>=><EM>value</EM> ...?);</P>
- <P> <EM>@list</EM> = <EM>$widget</EM>-><STRONG>configure</STRONG>('<EM>-option</EM>');</P>
- <P> <EM>@lol</EM> = <EM>$widget</EM>-><STRONG>configure</STRONG>;</P>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>All widgets, and images have a standard mechanism for setting and querying
- attibutes or options. The mechanism is based on two methods <STRONG>configure</STRONG>
- and <STRONG>cget</STRONG>. The behaviour of these methods is as follows:</P>
- <DL>
- <DT><STRONG><A NAME="item_configure"><EM>$widget</EM>-><STRONG>configure</STRONG>(<EM>-option</EM>=><EM>value</EM> ?,<EM>-option</EM>=><EM>value</EM> ...?);</A></STRONG><BR>
- <DD>
- Sets the values of <EM>-option</EM> to <EM>value</EM> for each <EM>-option</EM>=><EM>value</EM>
- pair. The internal <STRONG>new</STRONG> method does an implicit <STRONG>configure</STRONG> in this
- form with options passed in at widget create time.
- <P></P>
- <DT><STRONG><EM>$widget</EM>-><STRONG>configure</STRONG>('<EM>-option</EM>')</STRONG><BR>
- <DD>
- In array context returns a list of five or two elements. If <EM>-option</EM>
- is an alias for another options it return a list consisting of the
- alias option and the name for the option is is an alias for, e.g.,
- <CODE>('-bg', 'background')</CODE>. If <EM>-option</EM> is not an alias the returned
- list has the following five elements:
- <DL>
- <DT><STRONG><A NAME="item_Option_Name"><EM>Option Name</EM></A></STRONG><BR>
- <DD>
- The value of <EM>-option</EM>, e.g., <STRONG>-background</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name"><EM>Name</EM></A></STRONG><BR>
- <DD>
- The option's name in the option database, e.g., <CODE>background</CODE>.
- <P></P>
- <DT><STRONG><A NAME="item_Class"><EM>Class</EM></A></STRONG><BR>
- <DD>
- The option's class value in the option database, e.g., <CODE>Background</CODE>.
- <P></P>
- <DT><STRONG><A NAME="item_Default"><EM>Default</EM></A></STRONG><BR>
- <DD>
- The default value for the option if not specified or in the option database,
- e.g., <CODE>grey</CODE>.
- <P></P>
- <DT><STRONG><A NAME="item_Value"><EM>Value</EM></A></STRONG><BR>
- <DD>
- The current value (as returned by <STRONG>cget</STRONG>), e.g., <CODE>white</CODE>.
- <P></P></DL>
- <DT><STRONG><EM>$widget</EM>-><STRONG>configure</STRONG></STRONG><BR>
- <DD>
- Returns a list of lists for all the options supported by <EM>$widget</EM>.
- Each sub-list is in the form returned by <STRONG>configure</STRONG>('<EM>-option</EM>').
- (This mechanism is used by the <STRONG>Tk::Derived</STRONG> class to determine
- the options available from base class.)
- <P></P>
- <DT><STRONG><A NAME="item_cget"><EM>$widget</EM>-><STRONG>cget</STRONG>('<EM>-option</EM>')</A></STRONG><BR>
- <DD>
- Returns the current value of <EM>-option</EM> for <EM>$widget</EM>.
- <P><STRONG>cget</STRONG>('<EM>-option</EM>') is clumsy with the need for <STRONG>''</STRONG> due to perl's
- parsing rules. Something more subtle using <A HREF="../../../lib/Pod/perlfunc.html#tie">tie</A> might look better.</P>
- <P></P></DL>
- <P>The following paragraphs describe the common configuration options supported by
- widgets in the Tk toolkit. Every widget does not necessarily support every option
- (see the the documentation entries for individual widgets for a list of the
- standard options supported by that widget), but if a widget does support an option
- with one of the names listed below, then the option has exactly the effect
- described below.</P>
- <P>In the descriptions below, ``Name'' refers to the option's name in the option
- database. ``Class'' refers to the option's class value
- in the option database. ``Switch'' refers to the switch used in widget-creation
- and <STRONG>configure</STRONG> widget methods to set this value. For example, if an option's
- configure option is <STRONG>-foreground</STRONG> and there exists a widget <EM>$widget</EM>, then the
- call:</P>
- <P> <EM>$widget</EM>-><STRONG>configure</STRONG>(<STRONG>-foreground</STRONG>=><STRONG>'black'</STRONG>)</P>
- <P>may be used to specify the value <STRONG>black</STRONG> for the option in the widget <EM>$widget</EM>.
- Configure options may be abbreviated, as long as the abbreviation is unambiguous
- (abbreviation is deprecated in perl/Tk).</P>
- <P>
- <H2><A NAME="creation options: widget name and class">Creation options: Widget Name and Class</A></H2>
- <P>The <STRONG>Name</STRONG> and <STRONG>-class</STRONG> options can only be specified when a widget is
- created, and cannot be changed with <STRONG>configure</STRONG>. These options determine
- the widget's identity and how Tk applies resource values from the
- option database (see <A HREF="../../../site/lib/Tk/option.html">the Tk::option manpage</A>) and so they
- cannot be assigned by the options database.</P>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_name">Name: <EM>name</EM></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_Name">Switch: <STRONG>Name</STRONG></A></STRONG><BR>
- <DD>
- Specifies the path element for the widget. Names generally begin with a
- lowercase letter.
- <P>Each widget has a unique <EM>pathname</EM> that follows the hierarchy from the
- <STRONG>MainWindow</STRONG> to the widget itself. Since the widget's <STRONG>PathName</STRONG> is
- used to assign options from the options database, it is important to
- specify a distinctive <STRONG>Name</STRONG> for any widget that will have non-default
- options. See <A HREF="../../../site/lib/Tk/option.html">the Tk::option manpage</A> for details.</P>
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_class">Name: <EM>class</EM></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dclass">Switch: <STRONG>-class</STRONG></A></STRONG><BR>
- <DD>
- Specifies a class for the window. Classes generally begin with an
- uppercase letter.
- <P>This class will be used when querying the option database for
- the window's other options (see Tk::options), and it will also be used
- later for other purposes such as bindings. One typically assigns a class
- to a <STRONG>TopLevel</STRONG> or <STRONG>Frame</STRONG> so that the class will apply to all of
- that widget's children.</P>
- <P></P></DL>
- <P>
- <H2><A NAME="reconfigurable options">Reconfigurable options</A></H2>
- <P>These options can be set at widget creation or changed later via <STRONG>configure</STRONG>.</P>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_activeBackground">Name: <STRONG>activeBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Foreground">Class: <STRONG>Foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dactivebackground">Switch: <STRONG>-activebackground</STRONG></A></STRONG><BR>
- <DD>
- Specifies background color to use when drawing active elements.
- An element (a widget or portion of a widget) is active if the
- mouse cursor is positioned over the element and pressing a mouse button
- will cause some action to occur.
- If strict Motif compliance has been requested by setting the
- <STRONG>$Tk::strictMotif</STRONG> variable, this option will normally be
- ignored; the normal background color will be used instead.
- For some elements on Windows and Macintosh systems, the active color
- will only be used while mouse button 1 is pressed over the element.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_activeBorderWidth">Name: <STRONG>activeBorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_BorderWidth">Class: <STRONG>BorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dactiveborderwidth">Switch: <STRONG>-activeborderwidth</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating
- the width of the 3-D border drawn around active elements.
- See above for definition of active elements.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- This option is typically only available in widgets displaying more
- than one element at a time (e.g. menus but not buttons).
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_activeForeground">Name: <STRONG>activeForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Background">Class: <STRONG>Background</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dactiveforeground">Switch: <STRONG>-activeforeground</STRONG></A></STRONG><BR>
- <DD>
- Specifies foreground color to use when drawing active elements.
- See above for definition of active elements.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_activetile">Name: <STRONG>activetile</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Tile">Class: <STRONG>Tile</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dactivetile">Switch: <STRONG>-activetile</STRONG></A></STRONG><BR>
- <DD>
- Specifies image used to display inside active elements of the widget.
- See above for definition of active elements.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_anchor">Name: <STRONG>anchor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Anchor">Class: <STRONG>Anchor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Danchor">Switch: <STRONG>-anchor</STRONG></A></STRONG><BR>
- <DD>
- Specifies how the information in a widget (e.g. text or a bitmap)
- is to be displayed in the widget.
- Must be one of the values <STRONG>n</STRONG>, <STRONG>ne</STRONG>, <STRONG>e</STRONG>, <STRONG>se</STRONG>,
- <STRONG>s</STRONG>, <STRONG>sw</STRONG>, <STRONG>w</STRONG>, <STRONG>nw</STRONG>, or <STRONG>center</STRONG>.
- For example, <STRONG>nw</STRONG> means display the information such that its
- top-left corner is at the top-left corner of the widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_background">Name: <STRONG>background</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Background</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dbackground">Switch: <STRONG>-background</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Alias%3A_%2Dbg">Alias: <STRONG>-bg</STRONG></A></STRONG><BR>
- <DD>
- Specifies the normal background color to use when displaying the
- widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_bitmap">Name: <STRONG>bitmap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Bitmap">Class: <STRONG>Bitmap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dbitmap">Switch: <STRONG>-bitmap</STRONG></A></STRONG><BR>
- <DD>
- Specifies a bitmap to display in the widget, in any of the forms
- acceptable to <STRONG>Tk_GetBitmap</STRONG>.
- The exact way in which the bitmap is displayed may be affected by
- other options such as <STRONG>-anchor</STRONG> or <STRONG>-justify</STRONG>.
- Typically, if this option is specified then it overrides other
- options that specify a textual value to display in the widget;
- the <STRONG>-bitmap</STRONG> option may be reset to an empty string to re-enable
- a text display.
- In widgets that support both <STRONG>-bitmap</STRONG> and <STRONG>-image</STRONG> options,
- <STRONG>-image</STRONG> will usually override <STRONG>-bitmap</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_borderWidth">Name: <STRONG>borderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>BorderWidth</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dborderwidth">Switch: <STRONG>-borderwidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Alias%3A_%2Dbd">Alias: <STRONG>-bd</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating the width
- of the 3-D border to draw around the outside of the widget (if such a
- border is being drawn; the <STRONG>relief</STRONG> option typically determines
- this). The value may also be used when drawing 3-D effects in the
- interior of the widget.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_cursor">Name: <STRONG>cursor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Cursor">Class: <STRONG>Cursor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dcursor">Switch: <STRONG>-cursor</STRONG></A></STRONG><BR>
- <DD>
- Specifies the mouse cursor to be used for the widget.
- The value may have any of the forms acceptable to <STRONG>Tk_GetCursor</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_dash">Name: <STRONG>dash</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Dash">Class: <STRONG>Dash</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ddash">Switch: <STRONG>-dash</STRONG></A></STRONG><BR>
- <DD>
- The value may have any of the forms accepted by <STRONG>Tk_GetDash</STRONG>,
- such as <STRONG>4</STRONG>, <STRONG>[6,4]</STRONG>, <STRONG>.</STRONG>, <STRONG>-</STRONG>, <STRONG>-.</STRONG>, or <STRONG>-..</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_dashoffset">Name: <STRONG>dashoffset</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Dashoffset">Class: <STRONG>Dashoffset</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ddashoffset">Switch: <STRONG>-dashoffset</STRONG></A></STRONG><BR>
- <DD>
- Specifies the offset in the dash list where the drawing starts.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_disabledForeground">Name: <STRONG>disabledForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_DisabledForeground">Class: <STRONG>DisabledForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ddisabledforeground">Switch: <STRONG>-disabledforeground</STRONG></A></STRONG><BR>
- <DD>
- Specifies foreground color to use when drawing a disabled element.
- If the option is specified as an empty string (which is typically the
- case on monochrome displays), disabled elements are drawn with the
- normal foreground color but they are dimmed by drawing them
- with a stippled fill pattern.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_disabledtile">Name: <STRONG>disabledtile</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Tile</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ddisabledtile">Switch: <STRONG>-disabledtile</STRONG></A></STRONG><BR>
- <DD>
- Specifies image to use when drawing a disabled element.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_exportSelection">Name: <STRONG>exportSelection</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ExportSelection">Class: <STRONG>ExportSelection</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dexportselection">Switch: <STRONG>-exportselection</STRONG></A></STRONG><BR>
- <DD>
- Specifies whether or not a selection in the widget should also be
- the X selection.
- The value may have any of the forms accepted by <STRONG>Tcl_GetBoolean</STRONG>,
- such as <STRONG>true</STRONG>, <STRONG>false</STRONG>, <STRONG>0</STRONG>, <STRONG>1</STRONG>, <STRONG>yes</STRONG>, or <STRONG>no</STRONG>.
- If the selection is exported, then selecting in the widget deselects
- the current X selection, selecting outside the widget deselects any
- widget selection, and the widget will respond to selection retrieval
- requests when it has a selection. The default is usually for widgets
- to export selections.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_font">Name: <STRONG>font</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Font">Class: <STRONG>Font</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dfont">Switch: <STRONG>-font</STRONG></A></STRONG><BR>
- <DD>
- Specifies the font to use when drawing text inside the widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_foreground">Name: <STRONG>foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Foreground</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dforeground">Switch: <STRONG>-foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Alias%3A_%2Dfg">Alias: <STRONG>-fg</STRONG></A></STRONG><BR>
- <DD>
- Specifies the normal foreground color to use when displaying the widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_highlightBackground">Name: <STRONG>highlightBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_HighlightBackground">Class: <STRONG>HighlightBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dhighlightbackground">Switch: <STRONG>-highlightbackground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the color to display in the traversal highlight region when
- the widget does not have the input focus.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_highlightColor">Name: <STRONG>highlightColor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_HighlightColor">Class: <STRONG>HighlightColor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dhighlightcolor">Switch: <STRONG>-highlightcolor</STRONG></A></STRONG><BR>
- <DD>
- Specifies the color to use for the traversal highlight rectangle that is
- drawn around the widget when it has the input focus.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_highlightThickness">Name: <STRONG>highlightThickness</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_HighlightThickness">Class: <STRONG>HighlightThickness</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dhighlightthickness">Switch: <STRONG>-highlightthickness</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating the width of the highlight
- rectangle to draw around the outside of the widget when it has the
- input focus.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- If the value is zero, no focus highlight is drawn around the widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_image">Name: <STRONG>image</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Image">Class: <STRONG>Image</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dimage">Switch: <STRONG>-image</STRONG></A></STRONG><BR>
- <DD>
- Specifies an image to display in the widget, which must have been
- created with an image create. (See <A HREF="../../../site/lib/Tk/Image.html">the Tk::Image manpage</A> for details of image creation.)
- Typically, if the <STRONG>-image</STRONG> option is specified then it overrides other
- options that specify a bitmap or textual value to display in the widget;
- the <STRONG>-image</STRONG> option may be reset to an empty string to re-enable
- a bitmap or text display.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_insertBackground">Name: <STRONG>insertBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Foreground</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dinsertbackground">Switch: <STRONG>-insertbackground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the color to use as background in the area covered by the
- insertion cursor. This color will normally override either the normal
- background for the widget (or the selection background if the insertion
- cursor happens to fall in the selection).
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_insertBorderWidth">Name: <STRONG>insertBorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>BorderWidth</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dinsertborderwidth">Switch: <STRONG>-insertborderwidth</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating the width
- of the 3-D border to draw around the insertion cursor.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_insertOffTime">Name: <STRONG>insertOffTime</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_OffTime">Class: <STRONG>OffTime</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dinsertofftime">Switch: <STRONG>-insertofftime</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative integer value indicating the number of
- milliseconds the insertion cursor should remain ``off'' in each blink cycle.
- If this option is zero then the cursor doesn't blink: it is on
- all the time.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_insertOnTime">Name: <STRONG>insertOnTime</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_OnTime">Class: <STRONG>OnTime</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dinsertontime">Switch: <STRONG>-insertontime</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative integer value indicating the number of
- milliseconds the insertion cursor should remain ``on'' in each blink cycle.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_insertWidth">Name: <STRONG>insertWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_InsertWidth">Class: <STRONG>InsertWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dinsertwidth">Switch: <STRONG>-insertwidth</STRONG></A></STRONG><BR>
- <DD>
- Specifies a value indicating the total width of the insertion cursor.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- If a border has been specified for the insertion
- cursor (using the <STRONG>insertBorderWidth</STRONG> option), the border
- will be drawn inside the width specified by the <STRONG>insertWidth</STRONG>
- option.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_jump">Name: <STRONG>jump</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Jump">Class: <STRONG>Jump</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Djump">Switch: <STRONG>-jump</STRONG></A></STRONG><BR>
- <DD>
- For widgets with a slider that can be dragged to adjust a value,
- such as scrollbars, this option determines when
- notifications are made about changes in the value.
- The option's value must be a boolean of the form accepted by
- <STRONG>Tcl_GetBoolean</STRONG>.
- If the value is false, updates are made continuously as the
- slider is dragged.
- If the value is true, updates are delayed until the mouse button
- is released to end the drag; at that point a single notification
- is made (the value ``jumps'' rather than changing smoothly).
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_justify">Name: <STRONG>justify</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Justify">Class: <STRONG>Justify</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Djustify">Switch: <STRONG>-justify</STRONG></A></STRONG><BR>
- <DD>
- When there are multiple lines of text displayed in a widget, this
- option determines how the lines line up with each other.
- Must be one of <STRONG>left</STRONG>, <STRONG>center</STRONG>, or <STRONG>right</STRONG>.
- <STRONG>Left</STRONG> means that the lines' left edges all line up, <STRONG>center</STRONG>
- means that the lines' centers are aligned, and <STRONG>right</STRONG> means
- that the lines' right edges line up.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_offset">Name: <STRONG>offset</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Offset">Class: <STRONG>Offset</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Doffset">Switch: <STRONG>-offset</STRONG></A></STRONG><BR>
- <DD>
- Specifies the offset of tiles (see also <STRONG>-tile</STRONG> option). It can
- have two different formats <STRONG>-offset x,y</STRONG> or <STRONG>-offset side</STRONG>,
- where side can be <STRONG>n</STRONG>, <STRONG>ne</STRONG>, <STRONG>e</STRONG>, <STRONG>se</STRONG>, <STRONG>s</STRONG>,
- <STRONG>sw</STRONG>, <STRONG>w</STRONG>, <STRONG>nw</STRONG>, or <STRONG>center</STRONG>. In the first case
- the origin is the origin of the toplevel of the current window.
- For the canvas itself and canvas objects the origin is the canvas
- origin, but putting <STRONG>#</STRONG> in front of the coordinate pair
- indicates using the toplevel origin in stead. For canvas objects,
- the <STRONG>-offset</STRONG> option is used for stippling as well.
- For the line and polygon canvas items you can also specify
- an index as argument, which connects the stipple or tile
- origin to one of the coordinate points of the line/polygon.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_orient">Name: <STRONG>orient</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Orient">Class: <STRONG>Orient</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dorient">Switch: <STRONG>-orient</STRONG></A></STRONG><BR>
- <DD>
- For widgets that can lay themselves out with either a horizontal
- or vertical orientation, such as scrollbars, this option specifies
- which orientation should be used. Must be either <STRONG>horizontal</STRONG>
- or <STRONG>vertical</STRONG> or an abbreviation of one of these.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_padX">Name: <STRONG>padX</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Pad">Class: <STRONG>Pad</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dpadx">Switch: <STRONG>-padx</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating how much extra space
- to request for the widget in the X-direction.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- When computing how large a window it needs, the widget will
- add this amount to the width it would normally need (as determined
- by the width of the things displayed in the widget); if the geometry
- manager can satisfy this request, the widget will end up with extra
- internal space to the left and/or right of what it displays inside.
- Most widgets only use this option for padding text: if they are
- displaying a bitmap or image, then they usually ignore padding
- options.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_padY">Name: <STRONG>padY</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Pad</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dpady">Switch: <STRONG>-pady</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating how much extra space
- to request for the widget in the Y-direction.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- When computing how large a window it needs, the widget will add
- this amount to the height it would normally need (as determined by
- the height of the things displayed in the widget); if the geometry
- manager can satisfy this request, the widget will end up with extra
- internal space above and/or below what it displays inside.
- Most widgets only use this option for padding text: if they are
- displaying a bitmap or image, then they usually ignore padding
- options.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_relief">Name: <STRONG>relief</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Relief">Class: <STRONG>Relief</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Drelief">Switch: <STRONG>-relief</STRONG></A></STRONG><BR>
- <DD>
- Specifies the 3-D effect desired for the widget. Acceptable
- values are <STRONG>raised</STRONG>, <STRONG>sunken</STRONG>, <STRONG>flat</STRONG>, <STRONG>ridge</STRONG>,
- <STRONG>solid</STRONG>, and <STRONG>groove</STRONG>.
- The value
- indicates how the interior of the widget should appear relative
- to its exterior; for example, <STRONG>raised</STRONG> means the interior of
- the widget should appear to protrude from the screen, relative to
- the exterior of the widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_repeatDelay">Name: <STRONG>repeatDelay</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_RepeatDelay">Class: <STRONG>RepeatDelay</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Drepeatdelay">Switch: <STRONG>-repeatdelay</STRONG></A></STRONG><BR>
- <DD>
- Specifies the number of milliseconds a button or key must be held
- down before it begins to auto-repeat. Used, for example, on the
- up- and down-arrows in scrollbars.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_repeatInterval">Name: <STRONG>repeatInterval</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_RepeatInterval">Class: <STRONG>RepeatInterval</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Drepeatinterval">Switch: <STRONG>-repeatinterval</STRONG></A></STRONG><BR>
- <DD>
- Used in conjunction with <STRONG>repeatDelay</STRONG>: once auto-repeat
- begins, this option determines the number of milliseconds between
- auto-repeats.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectBackground">Name: <STRONG>selectBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Foreground</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectbackground">Switch: <STRONG>-selectbackground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the background color to use when displaying selected
- items.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectBorderWidth">Name: <STRONG>selectBorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>BorderWidth</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectborderwidth">Switch: <STRONG>-selectborderwidth</STRONG></A></STRONG><BR>
- <DD>
- Specifies a non-negative value indicating the width
- of the 3-D border to draw around selected items.
- The value may have any of the forms acceptable to <STRONG>Tk_GetPixels</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectForeground">Name: <STRONG>selectForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Background</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectforeground">Switch: <STRONG>-selectforeground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the foreground color to use when displaying selected
- items.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_setGrid">Name: <STRONG>setGrid</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_SetGrid">Class: <STRONG>SetGrid</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dsetgrid">Switch: <STRONG>-setgrid</STRONG></A></STRONG><BR>
- <DD>
- Specifies a boolean value that determines whether this widget controls the
- resizing grid for its top-level window.
- This option is typically used in text widgets, where the information
- in the widget has a natural size (the size of a character) and it makes
- sense for the window's dimensions to be integral numbers of these units.
- These natural window sizes form a grid.
- If the <STRONG>setGrid</STRONG> option is set to true then the widget will
- communicate with the window manager so that when the user interactively
- resizes the top-level window that contains the widget, the dimensions of
- the window will be displayed to the user in grid units and the window
- size will be constrained to integral numbers of grid units.
- See <A HREF="../../../site/lib/Tk/Wm.html#gridded geometry management">GRIDDED GEOMETRY MANAGEMENT in the Tk::Wm manpage</A>
- for more details.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_takeFocus">Name: <STRONG>takeFocus</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_TakeFocus">Class: <STRONG>TakeFocus</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtakefocus">Switch: <STRONG>-takefocus</STRONG></A></STRONG><BR>
- <DD>
- Determines whether the window accepts the focus during keyboard
- traversal (e.g., Tab and Shift-Tab).
- Before setting the focus to a window, the traversal scripts
- consult the value of the <STRONG>takeFocus</STRONG> option.
- A value of <STRONG>0</STRONG> means that the window should be skipped entirely
- during keyboard traversal.
- <STRONG>1</STRONG> means that the window should receive the input
- focus as long as it is viewable (it and all of its ancestors are mapped).
- An empty value for the option means that the traversal scripts make
- the decision about whether or not to focus on the window: the current
- algorithm is to skip the window if it is
- disabled, if it has no key bindings, or if it is not viewable.
- If the value has any other form, then the traversal scripts take
- the value, append the name of the window to it (with a separator space),
- and evaluate the resulting string as a Callback.
- The script must return <STRONG>0</STRONG>, <STRONG>1</STRONG>, or an empty string: a
- <STRONG>0</STRONG> or <STRONG>1</STRONG> value specifies whether the window will receive
- the input focus, and an empty string results in the default decision
- described above.
- Note: this interpretation of the option is defined entirely by
- the Callbacks that implement traversal: the widget implementations
- ignore the option entirely, so you can change its meaning if you
- redefine the keyboard traversal scripts.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_text">Name: <STRONG>text</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Text">Class: <STRONG>Text</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtext">Switch: <STRONG>-text</STRONG></A></STRONG><BR>
- <DD>
- Specifies a string to be displayed inside the widget. The way in which
- the string is displayed depends on the particular widget and may be
- determined by other options, such as <STRONG>anchor</STRONG> or <STRONG>justify</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_textVariable">Name: <STRONG>textVariable</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Variable">Class: <STRONG>Variable</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtextvariable">Switch: <STRONG>-textvariable</STRONG></A></STRONG><BR>
- <DD>
- Specifies the name of a variable. The value of the variable is a text
- string to be displayed inside the widget; if the variable value changes
- then the widget will automatically update itself to reflect the new value.
- The way in which the string is displayed in the widget depends on the
- particular widget and may be determined by other options, such as
- <STRONG>anchor</STRONG> or <STRONG>justify</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_troughColor">Name: <STRONG>troughColor</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Background</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtroughcolor">Switch: <STRONG>-troughcolor</STRONG></A></STRONG><BR>
- <DD>
- Specifies the color to use for the rectangular trough areas
- in widgets such as scrollbars and scales.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_troughTile">Name: <STRONG>troughTile</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Tile</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dtroughtile">Switch: <STRONG>-troughtile</STRONG></A></STRONG><BR>
- <DD>
- Specifies image used to display in the rectangular trough areas
- in widgets such as scrollbars and scales.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_underline">Name: <STRONG>underline</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Underline">Class: <STRONG>Underline</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dunderline">Switch: <STRONG>-underline</STRONG></A></STRONG><BR>
- <DD>
- Specifies the integer index of a character to underline in the widget.
- This option is used by the default bindings to implement keyboard
- traversal for menu buttons and menu entries.
- 0 corresponds to the first character of the text displayed in the
- widget, 1 to the next character, and so on.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_wrapLength">Name: <STRONG>wrapLength</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_WrapLength">Class: <STRONG>WrapLength</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dwraplength">Switch: <STRONG>-wraplength</STRONG></A></STRONG><BR>
- <DD>
- For widgets that can perform word-wrapping, this option specifies
- the maximum line length.
- Lines that would exceed this length are wrapped onto the next line,
- so that no line is longer than the specified length.
- The value may be specified in any of the standard forms for
- screen distances.
- If this value is less than or equal to 0 then no wrapping is done: lines
- will break only at newline characters in the text.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_xScrollCommand">Name: <STRONG>xScrollCommand</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ScrollCommand">Class: <STRONG>ScrollCommand</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dxscrollcommand">Switch: <STRONG>-xscrollcommand</STRONG></A></STRONG><BR>
- <DD>
- Specifies a callback used to communicate with horizontal
- scrollbars.
- When the view in the widget's window changes (or
- whenever anything else occurs that could change the display in a
- scrollbar, such as a change in the total size of the widget's
- contents), the widget will
- make a callback passing two numeric arguments in addition to
- any specified in the callback.
- Each of the numbers is a fraction between 0 and 1, which indicates
- a position in the document. 0 indicates the beginning of the document,
- 1 indicates the end, .333 indicates a position one third the way through
- the document, and so on.
- The first fraction indicates the first information in the document
- that is visible in the window, and the second fraction indicates
- the information just after the last portion that is visible.
- Typically the
- <STRONG>xScrollCommand</STRONG> option consists of the scrollbar widget object
- and the method ``set'' i.e. [<STRONG>set</STRONG> => <EM>$sb</EM>]:
- this will cause the scrollbar to be updated whenever the view in the window changes.
- If this option is not specified, then no command will be executed.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_yScrollCommand">Name: <STRONG>yScrollCommand</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>ScrollCommand</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dyscrollcommand">Switch: <STRONG>-yscrollcommand</STRONG></A></STRONG><BR>
- <DD>
- Specifies a calback used to communicate with vertical
- scrollbars. This option is treated in the same way as the
- <STRONG>xScrollCommand</STRONG> option, except that it is used for vertical
- scrollbars and is provided by widgets that support vertical scrolling.
- See the description of <STRONG>xScrollCommand</STRONG> for details
- on how this option is used.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="see also">SEE ALSO</A></H1>
- <P><A HREF="../../../site/lib/Tk/option.html">Tk::option</A>
- <A HREF="../../../site/lib/Tk/callbacks.html">Tk::callbacks</A>
- <A HREF="../../../site/lib/Tk/configspec.html">Tk::configspec</A>
- <A HREF="../../../Tk/pTk/GetPixels.html">Tk_GetPixels</A></P>
- <P>
- <HR>
- <H1><A NAME="keywords">KEYWORDS</A></H1>
- <P>class, name, standard option, switch</P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::options - Standard options supported by widgets and their manipulation</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-