[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
Motif and CDE 2.1 Style Guide Reference
Text Field (Abstract Control)
Reference
Description
A text field is a control in which characters can be displayed and
selected. All text fields are either text-display fields or text-entry fields.
When to Use
RequiredProvide a text field when you display a sequence of characters that the
user can manipulate as a unit or in which you want to allow the user to
navigate and manipulate at least one subsequence of characters.
Guidelines
RequiredOrganize elements of a text field into complete words as the first level
of a multilevel hierarchy (for example, double-clicking SELECT on a word
should select the word). The boundary of a word is defined by a
language's characters in the text field.
RecommendedIn a multiline text field, support a multilevel hierarchy for elements
above the level of words, up to and including the entire selection scope. For
example, support sentences and/or lines, paragraphs, sections, and so on, up
to the entire contents of the selection scope.
RequiredSupport point and range selection techniques and multilevel selection
techniques for text.
RequiredIf supporting area techniques, provide a choice that allows the user to
switch between use of range and area techniques.
RequiredWhen the user presses Ctrl Space in a text field, it should have the same
effect as a keyboard-based point selection technique.
RequiredWhen the user presses Ctrl Shift Space in a text field, it should have the
same effect as a keyboard-based range adjust click selection technique.
RequiredIf word-wrapping is used and as a result multiple lines are displayed in a
text field, treat each visual line as a separate line for navigation
operations.
RecommendedSupport discontiguous selections in text.
RecommendedSupport the area selection model in the text field, if the characters are
displayed in a fixed-width font.
RequiredThe directional keys should operate in the following manner:
^In a multiline text field, move the cursor up one visually displayed line.
VIn a multiline text field, move the cursor down one visually displayed
line.
<Move the cursor left one character.
>Move the cursor right one character.
RequiredThe directional keys augmented by Ctrl should operate as follows:
Ctrl <In a text field with multiple words, move the cursor to the beginning of
the word to the left.
Ctrl >In a text field with multiple words, move the cursor to the beginning of
the word to the right.
RequiredWhen the user presses a directional key to move the cursor horizontally,
wrap the text cursor from the end of one row to the beginning of the next row
(and vice versa). Do not, however, wrap between the beginning and the end of
the text field.
RequiredThe navigational keys should operate as follows:
Home (or Begin)Place the cursor at the beginning of the current line.
ENDPlace the cursor at the end of the current line.
Ctrl Home (or Ctrl Begin)Place the cursor before the first character.
Ctrl EndPlace the cursor after the last character.
RecommendedThe navigational keys should operate as follows when augmented with the
Ctrl key:
Ctrl ^In a multiline text field, if you support hierarchical elements above the
level of a line, move the cursor to the beginning of the previous element at
the hierarchical level above the line. For example, if paragraphs are the
hierarchical parts above the line, move the cursor to the beginning of the
previous paragraph.
Ctrl VIn a multiline text field, if you support hierarchical elements above the
level of a line, move the cursor to the beginning of the next element at the
hierarchical level above the line. For example, if paragraphs are the
hierarchical parts above the line, move the cursor to the beginning of the
next paragraph.
RequiredWhen nontextual elements that have no internal navigation (such as icons
or choices) are included as elements in text and laid out as characters,
navigation should perform in the following ways:
When the user is navigating through text, a text cursor should always stop
between adjacent characters, between a character and a nontextual element, and
between two adjacent nontextual elements.
Use an element cursor to indicate that focus is on a nontextual element.
When a text cursor is immediately to the left or right of a nontextual
element, allow > and < to remove the text cursor and move focus
to the nontextual element.
When an element cursor is on a nontextual element, allow > and
< to remove focus from the nontextual element and place the text cursor
to the right or left of the element.
Treat nontextual elements as words with regard to multilevel navigation.
That is, if the cursor is on the nontextual element or immediately before it
and the user presses Shift >, move the text cursor to the beginning of
the word (or nontextual element) following it. If the cursor is on the
nontextual element or immediately after it and the user presses Shift
<, move the text cursor immediately before it.
RequiredTreat nontextual elements included with characters in text either as
selectable or nonselectable consistently within the scope. If they are treated
as nonselectable, exclude them from selections that physically contain them.
RequiredWhen active regions (regions of text that act like action choices) are
allowed in a text field, use the following rules:
Active regions must be highlighted to indicate their boundaries and must
not overlap.
When the user clicks the SELECT button within an active region, invoke the
action associated with that region and move the text cursor to the pointer
location.
When the user presses the SELECT button within an active region without
clicking (including releasing SELECT past the threshold time), select the
active region.
When the user clicks Ctrl SELECT within an active region, move the text
cursor to the location clicked, but do not invoke the action associated with
the region.
When the text cursor is within an active region, the default action should
be invoking the action that corresponds to the region.
If the user can edit the text field, all characters typed have their usual
effect regardless of whether or not the text cursor is within an active
region. For example, when the user presses Enter in an editable multiline text
control, insert a new line in the active region. When the user presses Ctrl
Enter, invoke the default action, which invokes the action that corresponds to
the region.
RecommendedWhen the length of the data is predictable, such as a date, time, or
telephone number, make the field wide enough and tall enough to show all of
the data.
RecommendedProvide a visible cue to indicate when the information in a text-display
field can be scrolled. For example, provide left and right arrow buttons on a
one-line text-display field or provide a scroll bar for text-display fields
with more than one line.
Essential Related Topics
For more information, see the Cascading (Choice Type), Choice, Input
Focus, Spring-Loaded (Control Type), Text-Entry Field (Control), and
Text-Display Field reference pages.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]