tinycobol/tcltk84/tk8.4/mentry2.8/doc/mentryWidget.html

736 lines
30 KiB
HTML

<html>
<head>
<title>The mentry::mentry Command</title>
<meta name="Author" content="Csaba Nemethi">
<meta name="Keywords" content="mentry, widget, entry, label">
</head>
<body bgcolor=#ffffff>
<div align=center>
<h1>The <code><b><font size=6>mentry::mentry</font></b></code> Command</h1>
<h3>by</h3>
<h2>Csaba Nemethi</h2>
<address>
<a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
</address>
</div>
<p><hr>
<a name="contents"></a>
<h2>Contents</h2>
<ul>
<li><a href="#quick_ref">Quick Reference</a>
<li><a href="#detailed_ref">Detailed Reference</a>
</ul>
<div align=center>
<p><a href="index.html">Start page</a>
</div>
<p><hr>
<a name="quick_ref"></a>
<h2>Quick Reference</h2>
<dl>
<dt><a href="#name">NAME</a>
<dd><code>mentry::mentry</code> - Create and manipulate multi-entry widgets
<p>
<dt><a href="#synopsis">SYNOPSIS</a>
<dd>
<pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
<p>
<dt><a href="#std_options">STANDARD OPTIONS</a>
<dd>
<pre>
<b>-borderwidth -highlightcolor -relief
-highlightbackground -highlightthickness</b>
</pre>
<p>
<dt><a href="#child_options">OPTIONS FOR ALL ENTRY AND LABEL CHILDREN</a>
<dd>
<pre>
<b>-background -cursor -font -foreground</b>
</pre>
<p>
<dt><a href="#entry_options">OPTIONS FOR ALL ENTRY CHILDREN</a>
<dd>
<pre>
<b>-exportselection -insertwidth -selectforeground
-insertbackground -invalidcommand -show
-insertborderwidth -justify -state
-insertofftime -selectbackground -validate
-insertontime -selectborderwidth -validatecommand</b>
</pre>
<p>
<dt><a href="#widget_options">WIDGET-SPECIFIC OPTIONS</a>
<dd><code><b><a href="#body">-body</a></b>
{<i>width</i> ?<i>text</i> <i>width</i> <i>text</i> ...?}</code>
<dd><code><b><a href="#disabledbackground">-disabledbackground</a></b>
<i>color</i></code>
<dd><code><b><a href="#disabledforeground">-disabledforeground</a></b>
<i>color</i></code>
<dd><code><b><a href="#readonlybackground">-readonlybackground</a></b>
<i>color</i></code>
<dd><code><b><a href="#takefocus">-takefocus</a></b>
<b>0</b>|<b>1</b>|<b>""</b>|<i>command</i></code>
<dd><code><b><a href="#textvariable">-textvariable</a></b>
<i>array</i></code>
<p>
<dt><a href="#description">DESCRIPTION</a>
<p>
<dt><a href="#widget_command">WIDGET COMMAND</a>
<dd><code><i>pathName</i> <b><a href="#attrib">attrib</a></b>
?<i>name</i>? ?<i>value</i> <i>name</i> <i>value</i> ...?</code>
<dd><code><i>pathName</i> <b><a href="#cget">cget</a></b>
<i>option</i></code>
<dd><code><i>pathName</i> <b><a href="#clear">clear</a></b>
<i>first</i> ?<i>last</i>?</code>
<dd><code><i>pathName</i> <b><a href="#configure">configure</a></b>
?<i>option</i>? ?<i>value</i> <i>option</i> <i>value</i> ...?</code>
<dd><code><i>pathName</i> <b><a href="#entries">entries</a></b></code>
<dd><code><i>pathName</i> <b><a href="#entrycount">entrycount</a></b></code>
<dd><code><i>pathName</i> <b><a href="#entrylimit">entrylimit</a></b>
<i>index</i></code>
<dd><code><i>pathName</i> <b><a href="#entrypath">entrypath</a></b>
<i>index</i></code>
<dd><code><i>pathName</i> <b><a href="#getarray">getarray</a></b>
<i>array</i></code>
<dd><code><i>pathName</i> <b><a href="#getlist">getlist</a></b></code>
<dd><code><i>pathName</i> <b><a href="#getstring">getstring</a></b></code>
<dd><code><i>pathName</i> <b><a href="#isempty">isempty</a></b>
?<i>index</i>?</code>
<dd><code><i>pathName</i> <b><a href="#isfull">isfull</a></b>
?<i>index</i>?</code>
<dd><code><i>pathName</i> <b><a href="#labelcount">labelcount</a></b></code>
<dd><code><i>pathName</i> <b><a href="#labelpath">labelpath</a></b>
<i>index</i></code>
<dd><code><i>pathName</i> <b><a href="#labels">labels</a></b></code>
<dd><code><i>pathName</i> <b><a href="#put">put</a></b>
<i>startIndex</i> ?<i>string</i> <i>string</i> ...?</code>
<p>
<dt><a href="#bindings">DEFAULT BINDINGS</a>
<p>
<dt><a href="#keywords">KEYWORDS</a>
<dd>mentry, widget, entry, label
</dl>
<div align=center>
<p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Start page</a>
</div>
<p><hr>
<a name="detailed_ref"></a>
<h2>Detailed Reference</h2>
<dl>
<a name="name"></a>
<dt><b>NAME</b>
<dd><code>mentry::mentry</code> - Create and manipulate multi-entry widgets
<p><a name="synopsis"></a>
<dt><b>SYNOPSIS</b>
<dd>
<pre>
<b>mentry::mentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
<p><a name="std_options"></a>
<dt><b>STANDARD OPTIONS</b>
<dd>
<pre>
<b>-borderwidth -highlightcolor -relief
-highlightbackground -highlightthickness</b>
</pre>
<p>
<dd>See the <b>options</b> manual entry for details on the standard
options.
<p><a name="child_options"></a>
<dt><b>OPTIONS FOR ALL ENTRY AND LABEL CHILDREN</b>
<dd>
<pre>
<b>-background -cursor -font -foreground</b>
</pre>
<p>
<dd>These options specify the values of the options with the same names for
all entry and label children of the given multi-entry widget.&nbsp;
These values may be changed for an individual child by using the
<code><b>configure</b></code> subcommand of the Tcl command
corresponding to that child.
<p><a name="entry_options"></a>
<dt><b>OPTIONS FOR ALL ENTRY CHILDREN</b>
<dd>
<pre>
<b>-exportselection -insertwidth -selectforeground
-insertbackground -invalidcommand -show
-insertborderwidth -justify -state
-insertofftime -selectbackground -validate
-insertontime -selectborderwidth -validatecommand</b>
</pre>
<p>
<dd>These options specify the values of the options with the same names for
all entry children of the given multi-entry widget.&nbsp; These values
may be changed for an individual entry child by using the
<code><b>configure</b></code> subcommand of the Tcl command
corresponding to that entry.&nbsp; The
<code><b>-invalidcommand</b></code>, <code><b>-validate</b></code>, and
<code><b>-validatecommand</b></code> options are only supported if Tk
version 8.3 or higher is used, because the options with the same names
for entry widgets were introduced in Tk 8.3.
<p><a name="widget_options"></a>
<dt><b>WIDGET-SPECIFIC OPTIONS</b>
<p><a name="body"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-body</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;body</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;Body</b></code>
</table>
<blockquote>
<p>Specifies the initial widths of the entry children of the given
multi-entry widget, as well as the texts to be displayed in the
labels separating the entries.&nbsp; The value of this option is
viewed as a list.&nbsp; Each odd-numbered element is interpreted as
the value of the <code><b>-width</b></code> configuration option of
an entry child, while each even-numbered element represents the value
of the <code><b>-text</b></code> configuration option of a label
child.&nbsp; The order of the list elements determines the creation
order of the child widgets; these will be packed in a row, without
any horizontal padding.&nbsp; The initial width of each entry child
also determines the number of elements that can be inserted into it;
this maximal length remains unchanged even if the width of the entry
is set to a new value later on.&nbsp; The width of an entry child and
the text displayed in a label may be changed by using the
<code><b>configure</b></code> subcommand of the Tcl command
corresponding to that child.
</blockquote>
<p><a name="disabledbackground"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-disabledbackground</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;disabledBackground</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;DisabledBackground</b></code>
</table>
<blockquote>
<p>This option, which is only supported for Tk versions 8.4 or
higher, specifies the background color to use for all entry and label
children of the given multi-entry widget when it is disabled.&nbsp;
If the value of this option is the empty string then the normal
background color is used.
</blockquote>
<p><a name="disabledforeground"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-disabledforeground</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;disabledForeground</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;DisabledForeground</b></code>
</table>
<blockquote>
<p>This option, which is only supported for Tk versions 8.4 or
higher, specifies the foreground color to use for all entry and label
children of the given multi-entry widget when it is disabled.&nbsp;
If the value of this option is the empty string then the normal
foreground color is used.
</blockquote>
<p><a name="readonlybackground"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-readonlybackground</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;readonlyBackground</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;ReadonlyBackground</b></code>
</table>
<blockquote>
<p>This option, which is only supported for Tk versions 8.4 or
higher, specifies the background color to use for all entry and label
children of the given multi-entry widget when it is readonly.&nbsp;
If the value of this option is the empty string then the normal
background color is used.
</blockquote>
<p><a name="takefocus"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-takefocus</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;takeFocus</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;TakeFocus</b></code>
</table>
<blockquote>
<p>This option determines whether the widget accepts the focus
during keyboard traversal.&nbsp; It is almost identical to the
standard option with the same name (see the <b>options</b>
manual entry for details).&nbsp; The only difference is that not the
widget itself but its first enabled entry child will receive the
focus during keyboard traversal with the standard keys
(<code>Tab</code> and <code>Shift-Tab</code>).&nbsp; See the <a href=
"#bindings">DEFAULT BINDINGS</a> section below for information on how
to move the focus from one entry child to another using the keyboard.
</blockquote>
<p><a name="textvariable"></a>
<dd><table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Command-Line Name:&nbsp;
<td><code><b>-textvariable</b></code>
<tr>
<td>Database Name:
<td><code><b>&nbsp;textvariable</b></code>
<tr>
<td>Database Class:
<td><code><b>&nbsp;Variable</b></code>
</table>
<blockquote>
<p>If the value of this option is not an empty string then it must be
an array.&nbsp; In this case, for each entry child of the given
multi-entry widget the value of the array element with the index of
the entry as element name specifies the value of the
<code><b>-textvariable</b></code> option for that entry.&nbsp; The
entry indices start with <code>0</code>.&nbsp; For example,
specifying&nbsp; <code>-textvariable arr</code>&nbsp; for a
multi-entry widget having two entry children is equivalent to
specifying&nbsp; <code>-textvariable arr(0)</code>&nbsp; for the
first and&nbsp; <code>-textvariable arr(1)</code>&nbsp; for the
second entry child of that widget.
</blockquote>
<p><a name="description"></a>
<dt><b>DESCRIPTION</b>
<dd>The <code><b>mentry::mentry</b></code> command creates a new window
named <code><i>pathName</i></code> and of the class
<code><b>Mentry</b></code>, and makes it into a <b>mentry</b>
widget.&nbsp; Additional options, described above, may be specified on
the command line or in the option database to configure aspects of the
mentry such as its colors, font, and children.&nbsp; The
<code><b>mentry::mentry</b></code> command returns its
<code><i>pathName</i></code> argument.&nbsp; At the time this command
is invoked, there must not exist a window named
<code><i>pathName</i></code>, but <code><i>pathName</i></code>'s parent
must exist.
<p>
<dd>The word <i>mentry</i> is an abbreviation of <i>multi-entry</i>.&nbsp;
A mentry is a mega-widget consisting of any number of entries separated
by labels, all embedded in a frame.&nbsp; Due to appropriately chosen
configuration options for the entries and labels, a mentry widget looks
like one single entry containing preinserted text pieces that cannot be
moved, changed, or deleted by the user.
<p>
<dd>As described above, the initial width of each entry child (specified by
the <code><b><a href="#body">-body</a></b></code> configuration option)
also determines the maximal number of characters that can be inserted
into it.&nbsp; This is achieved with the aid of the <code><b><a href=
"wcbRef.html#callback">wcb::callback</a></b></code> command, by
registering the <code><b><a href=
"wcbRef.html#entrycb">wcb::checkEntryLen</a></b></code>
before-<code><b>insert</b></code> callback with the entry child.&nbsp;
In order to keep this callback, additional
before-<code><b>insert</b></code> callbacks (if needed) should only be
registered with the <code><b><a href=
"wcbRef.html#cbappend">wcb::cbappend</a></b></code> and <code><b><a
href="wcbRef.html#cbprepend">wcb::cbprepend</a></b></code>
commands.&nbsp; When reaching this limit in an entry having the input
focus, the latter is set automatically to the next enabled entry child,
the contents of that widget is selected, and the insertion cursor is
set to its end.&nbsp; This is made sure by defining an appropriate
after-<code><b>insert</b></code> callback, which must be kept to be the
last such callback for the entry.&nbsp; For this reason, additional
after-<code><b>insert</b></code> callbacks (if needed) should only be
registered with the <code><b>wcb::cbprepend</b></code> command.&nbsp;
The same command should be used exclusively to define
after-<code><b>motion</b></code> callbacks (if needed), because
<code><b>mentry::mentry</b></code> registers one that must be the last
after-<code><b>motion</b></code> callback for each entry child.
<p>
<dd>Each mentry widget may have any number of <b>attributes</b>, which can
be used in commands that create or manipulate mentry widgets for
particular purposes.&nbsp; For example, each date mentry created by the
<code><b><a href=
"mentryDateTime.html#dateMentry">mentry::dateMentry</a></b></code>
command has a <code><b>type</b></code> attribute having the value
<code>"Date"</code> and a <code><b>format</b></code> attribute
specifying the meanings of its components.&nbsp; The values of these
attributes are queried and used in the bodies of the procedures
<code><b><a href=
"mentryDateTime.html#putClockVal">mentry::putClockVal</a></b></code>
and <code><b><a href=
"mentryDateTime.html#getClockVal">mentry::getClockVal</a></b></code>.
<p><a name="widget_command"></a>
<dt><b>WIDGET COMMAND</b>
<dd>
<dl>
<dt>The <code><b>mentry::mentry</b></code> command creates a new Tcl
command whose name is <code><i>pathName</i></code>.&nbsp; This
command may be used to invoke various operations on the
widget.&nbsp; It has the following general form:
<blockquote><pre>
<p><i>pathName</i> <i>option</i> ?<i>arg</i> <i>arg</i> ...?
</pre></blockquote>
<p>
<dt><code><i>option</i></code> and the <code><i>arg</i></code>s
determine the exact behavior of the command.
<p>
<dt>Some of the widget commands for mentries take an index as
argument.&nbsp; An index specifies a particular entry or label
child of the mentry, in any of the following ways:
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr valign=top>
<td width=60><code><i>number</i></code>
<td>Specifies the child as a numerical index, where <code>0</code>
corresponds to the first entry or label child.<br>
&nbsp;
<tr valign=top>
<td><code><b>end</b></code>
<td>Indicates the last entry or label child of the mentry.
</table>
<p>
<dt>The word <code><b>end</b></code> can be abbreviated as
<code><b>en</b></code> or <code><b>e</b></code>.&nbsp; Out-of-range
indices are automatically rounded to the nearest legal value.
<p>
<dt>The following commands are possible for mentry widgets:
<p><a name="attrib"></a>
<dt><code><i>pathName</i> <b>attrib</b> ?<i>name</i>? ?<i>value</i>
<i>name</i> <i>value</i> ...?</code>
<dd>Queries or modifies the attributes of the widget.&nbsp; If no
<code><i>name</i></code> is specified, the command returns a list
of pairs, each of which contains the name and the value of an
attribute for <code><i>pathName</i></code>.&nbsp; If
<code><i>name</i></code> is specified with no
<code><i>value</i></code>, then the command returns the value of
the one named attribute.&nbsp; If one or more
<code><i>name</i></code>-<code><i>value</i></code> pairs are
specified, then the command sets the given widget attribute(s) to
the given value(s); in this case the return value is an empty
string.&nbsp; <code><i>name</i></code> may be an arbitrary
string.
<p><a name="cget"></a>
<dt><code><i>pathName</i> <b>cget</b> <i>option</i></code>
<dd>Returns the current value of the configuration option given by
<code><i>option</i></code>, which may have any of the values
accepted by the <code><b>mentry::mentry</b></code> command.
<p><a name="clear"></a>
<dt><code><i>pathName</i> <b>clear</b> <i>first</i>
?<i>last</i>?</code>
<dd>Erases the contents of one or more entry children of the
widget.&nbsp; <code><i>first</i></code> and
<code><i>last</i></code> are indices specifying the first and
last entries in the range to clear.&nbsp; If
<code><i>last</i></code> is not specified then it defaults to
<code><i>first</i></code>, i.e., a single entry child is
cleared.&nbsp; The return value is an empty string.
<p><a name="configure"></a>
<dt><code><i>pathName</i> <b>configure</b> ?<i>option</i>?
?<i>value</i> <i>option</i> <i>value</i> ...?</code>
<dd>Queries or modifies the configuration options of the
widget.&nbsp; If no <code><i>option</i></code> is specified, the
command returns a list describing all of the available options
for <code><i>pathName</i></code> (see
<code><b>Tk_ConfigureInfo</b></code> for information on the
format of this list).&nbsp; If <code><i>option</i></code> is
specified with no <code><i>value</i></code>, then the command
returns a list describing the one named option (this list will be
identical to the corresponding sublist of the value returned if
no <code><i>option</i></code> is specified).&nbsp; If one or more
<code><i>option</i></code>-<code><i>value</i></code> pairs are
specified, then the command modifies the given widget option(s)
to have the given value(s); in this case the return value is an
empty string.&nbsp; <code><i>option</i></code> may have any of
the values accepted by the <code><b>mentry::mentry</b></code>
command.
<p><a name="entries"></a>
<dt><code><i>pathName</i> <b>entries</b></code>
<dd>Returns a list containing the path names of all entry children of
the widget.
<p><a name="entrycount"></a>
<dt><code><i>pathName</i> <b>entrycount</b></code>
<dd>Returns the number of all entry children of the widget.
<p><a name="entrylimit"></a>
<dt><code><i>pathName</i> <b>entrylimit</b> <i>index</i></code>
<dd>Returns the number of characters that can be inserted into the
entry child identfied by <code><i>index</i></code>.
<p><a name="entrypath"></a>
<dt><code><i>pathName</i> <b>entrypath</b> <i>index</i></code>
<dd>Returns the path name of the entry child identfied by
<code><i>index</i></code>.
<p><a name="getarray"></a>
<dt><code><i>pathName</i> <b>getarray</b> <i>array</i></code>
<dd>For each entry child of the widget, the command assigns the
string contained in the entry to the element of
<code><i>array</i></code> having the index of the entry as
element name.&nbsp; The entry indices start with
<code>0</code>.&nbsp; The return value is an empty string.
<p><a name="getlist"></a>
<dt><code><i>pathName</i> <b>getlist</b></code>
<dd>Returns a list containing the strings of all entry children of
the widget.
<p><a name="getstring"></a>
<dt><code><i>pathName</i> <b>getstring</b></code>
<dd>Returns a string built by concatenating the strings contained in
the entry children of the widget with the texts displayed in the
labels separating the entries, in the creation order of the
children, as given by the <code><b><a href=
"#body">-body</a></b></code> configuration option.&nbsp; That is,
the string of the first entry child is followed by the text of
the first label, which in turn is followed by the string of the
second entry, and so on.
<p><a name="isempty"></a>
<dt><code><i>pathName</i> <b>isempty</b> ?<i>index</i>?</code>
<dd>If <code><i>index</i></code> is specified then the command
returns the value <code>1</code> if the string contained in the
entry child identfied by <code><i>index</i></code> is empty and
<code>0</code> otherwise.&nbsp; If this optional argument is not
present then the command returns the value <code>1</code> if the
strings contained in the entry children of the widget are all
empty and <code>0</code> otherwise.
<p><a name="isfull"></a>
<dt><code><i>pathName</i> <b>isfull</b> ?<i>index</i>?</code>
<dd>If <code><i>index</i></code> is specified then the command
returns the value <code>1</code> if the length of the string
contained in the entry child identfied by
<code><i>index</i></code> equals the number of characters that
can be inserted into the entry and <code>0</code>
otherwise.&nbsp; If this optional argument is not present then
the command returns the value <code>1</code> if the lengths of
the strings contained in the entry children of the widget all
equal the numbers of characters that can be inserted into the
respective entries (i.e., if all entry children are full) and
<code>0</code> otherwise.
<p><a name="labelcount"></a>
<dt><code><i>pathName</i> <b>labelcount</b></code>
<dd>Returns the number of all label children of the widget.
<p><a name="labelpath"></a>
<dt><code><i>pathName</i> <b>labelpath</b> <i>index</i></code>
<dd>Returns the path name of the label child identfied by
<code><i>index</i></code>.
<p><a name="labels"></a>
<dt><code><i>pathName</i> <b>labels</b></code>
<dd>Returns a list containing the path names of all label children of
the widget.
<p><a name="put"></a>
<dt><code><i>pathName</i> <b>put</b> <i>startIndex</i> ?<i>string</i>
<i>string</i> ...?</code>
<dd>Replaces the texts of the entry children whose indices are
greater than or equal to <code><i>startIndex</i></code> with the
corresponding <code><i>string</i></code> arguments by using the
<code><b>delete</b></code> and <code><b>insert</b></code>
operations, until either the entries or the
<code><i>string</i></code>s are consumed.&nbsp; If one of these
subcommands gets canceled by some before-callback in any entry
child then the command restores the original contents of all
affected entries and returns the value <code>0</code>, otherwise
it returns <code>1</code>.&nbsp; In both cases, the command keeps
the position of the insertion cursor in all entry children.
</dl>
<p><a name="bindings"></a>
<dt><b>DEFAULT BINDINGS</b>
<dd>The <code><b>mentry::mentry</b></code> command partially redefines the
bindings of the children of the mentry widget it creates:
<p>
<ol>
<li>Clicking mouse button 1 in a label child positions the insertion
cursor to the end of the last enabled entry preceding the label,
sets the input focus to that entry, and clears any selection in
it.
<p>
<li>If in a non-empty entry child a character is typed that is
contained in the label following that entry (if any), then the
focus is moved to the next enabled entry child, the contents of
that entry are selected, and the insertion cursor is set to its
end.
<p>
<li>At the beginning of an entry child that is not the first enabled
entry within the widget, the <code>Left</code> key clears the
selection in that entry, moves the focus to the previous enabled
entry child, and sets the insertion cursor to the end of that
widget.&nbsp; Similarly, at the end of an entry child that is not
the last enabled entry within the widget, the <code>Right</code>
key clears the selection in that entry, moves the focus to the
next enabled entry child, and sets the insertion cursor to the
beginning of that widget.&nbsp; If
<code><b>tk_strictMotif</b></code> is false then
<code>Control-b</code> and <code>Control-f</code> behave the same
as <code>Left</code> and <code>Right</code>, respectively.
<p>
<li>In an entry child that is not the first enabled entry within the
widget, <code>Control-Left</code> moves the focus to the previous
enabled entry child, selects the contents of that widget, and
sets the insertion cursor to its end; if there is no enabled
entry child to the left of the current one then
<code>Control-Left</code> moves the insertion cursor to the
beginning of the current entry and clears the selection in that
widget.&nbsp; Similarly, in an entry child that is not the last
enabled entry within the widget, <code>Control-Right</code> moves
the focus to the next enabled entry child, selects the contents
of that widget, and sets the insertion cursor to its end; if
there is no enabled entry child to the right of the current one
then <code>Control-Right</code> moves the insertion cursor to the
end of the current entry and clears the selection in that
widget.&nbsp; If <code><b>tk_strictMotif</b></code> is false then
<code>Meta-b</code> and <code>Meta-f</code> behave the same as
<code>Control-Left</code> and <code>Control-Right</code>,
respectively.
<p>
<li>The <code>Home</code> key clears the selection in the current
entry widget, moves the focus to the first enabled entry child,
and sets the insertion cursor to the beginning of that
widget.&nbsp; Similarly, the <code>End</code> key clears the
selection in the current entry widget, moves the focus to the
last enabled entry child, and sets the insertion cursor to the
end of that widget.&nbsp; If <code><b>tk_strictMotif</b></code>
is false then <code>Control-a</code> and <code>Control-e</code>
behave the same as <code>Home</code> and <code>End</code>,
respectively.
<p>
<li><code>Shift-Home</code> moves the focus to the first enabled
entry child, sets the insertion cursor to the beginning of that
widget, and either extends the selection to that position, or
clears the selection in the current entry and selects the
contents of the new widget, depending upon whether the current
entry is the first enabled entry child or not.&nbsp; Similarly,
<code>Shift-End</code> moves the focus to the last enabled entry
child, sets the insertion cursor to the end of that widget, and
either extends the selection to that position, or clears the
selection in the current entry and selects the contents of the
new widget, depending upon whether the current entry is the last
enabled entry child or not.
<p>
<li>The <code>BackSpace</code> key deletes the selection if there is
one in the current entry.&nbsp; Otherwise, it deletes either the
character to the left of the insertion cursor in the current
entry, or the last character of the previous enabled entry
child.&nbsp; The latter takes place at the beginning of an entry
child that is not the first enabled entry within the widget; in
this case, the <code>BackSpace</code> key also moves the focus to
the previous enabled entry child and sets the insertion cursor to
its end.&nbsp; If <code><b>tk_strictMotif</b></code> is false
then <code>Control-h</code> behaves the same as
<code>BackSpace</code>.
<p>
<li>If <code><b>tk_strictMotif</b></code> is false then
<code>Meta-d</code> deletes all characters to the right of the
insertion cursor within the current entry, while
<code>Meta-BackSpace</code> and <code>Meta-Delete</code> delete
either all characters to the left of the insertion cursor in the
current entry, or the contents of the previous enabled entry
child.&nbsp; The latter takes place at the beginning of an entry
child that is not the first enabled entry within the widget; in
this case, <code>Meta-BackSpace</code> and
<code>Meta-Delete</code> also clear the selection in the current
entry widget and move the focus to the previous enabled entry
child.
</ol>
<p><a name="keywords"></a>
<dt><b>KEYWORDS</b>
<dd>mentry, widget, entry, label
</dl>
<div align=center>
<p><a href="#contents">Contents</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Start page</a>
</div>
</body>
</html>