entryx(n)		     Ck Built-In Commands		     entryx(n)



______________________________________________________________________________

NAME
       entryx - Create extended entry widgets

SYNOPSIS
       entryx pathName ?options?
_________________________________________________________________


DESCRIPTION
       This  procedure	is  part  of  the  Ck script library. It is a slightly
       extended version of the Tcl entry command which provides the  following
       additional command line options:

       -default value
	      Default  value  for integer, unsigned, and float modes, which is
	      stored in entry widget on FocusOut, if the value in  the	widget
	      is not a legal number. Defaults to an empty string.

       -fieldwidth number
	      Limits  the string in the entry widget to at most number charac-
	      ters.  Defaults to some ten thousand characters.

       -initial value
	      Initial value for the entry's string. If this option is omitted,
	      no initial value is set.

       -mode modeName
	      Determines the additional bindings for input checking which will
	      be bound to the entry widget. ModeName must be  one  of  integer
	      (for  integer  numbers  including	 optional sign), unsigned (for
	      integer numbers without sign), float (for floating point numbers
	      including	 optional  sign and fractional part, but without expo-
	      nent part), normal (for entries without input checking at	 all),
	      regexp  (for  checking  the  entry's  string  against  a regular
	      expression), and boolean (for boolean values, e.g. 0 or 1, Y  or
	      N	 and so on).  If the -mode option is omitted, normal is chosen
	      as default.

       -offvalue char
	      For mode boolean entry  widgets  only:  char  is	used  for  the
	      ``false''	 state	of  the	 entry.	 Char defaults to ``0''. It is
	      always converted to upper case.

       -onvalue char
	      For mode boolean entry  widgets  only:  char  is	used  for  the
	      ``true''	state  of  the	entry.	Char  defaults to ``1''. It is
	      always converted to upper case.

       -regexp regExp
	      For all modes this is  the  regular  expression  which  provides
	      input filtering.	This option is ignored for boolean mode.

       -touchvariable varName
	      The  global  variable  varName  is  set  to  1 whenever the user
	      changes the entry's string. The user may reset this variable  to
	      0 at any time.

       These  options must be given at creation time of the entry. They cannot
       be modified later using the configure widget command.

       After creating the entry widget, entryx binds procedures	 to  do	 input
       checking	 using the bindtags mechanism to the entry widget.  These pro-
       cedures provide for overtype rather than insert mode and give the  fol-
       lowing behaviour:

       [1]    If  mouse button 1 is pressed on the entry and the entry accepts
	      the input focus, the input focus is set on  the  entry  and  the
	      entry's insertion cursor is placed on the very first character.

       [2]    The  Left and Right keys move the insertion cursor one character
	      to the left or right. In boolean mode these keys	are  used  for
	      keyboard	traversal,  i.e.  the  Left key moves the focus to the
	      previous widget in focus order, the Right key to the  next  wid-
	      get.

       [3]    The return key moves the input focus to the next widget in focus
	      order.

       [4]    The Home key moves the insertion cursor to the beginning of  the
	      entry. In boolean mode this key is ignored.

       [5]    The  End key moves the insertion cursor to the end of the entry.
	      In boolean mode this key is ignored.

       [6]    The Delete key deletes the character to the right of the	inser-
	      tion cursor.  In boolean mode this key is ignored.

       [7]    The BackSpace key and Control-h delete the character to the left
	      of the insertion cursor. In boolean mode this key is ignored.

       [8]    The space key deletes from the insertion cursor until the end of
	      the  entry,  if  the mode is integer, unsigned, float or regexp.
	      For regexp mode, the space character must not  be	 part  of  the
	      regular  expression  to  achieve this behaviour. Otherwise it is
	      treated as all other printable keys. In boolean  mode  this  key
	      toggles the entry's value.

       [9]    All  other  printable  keys are checked according to the entry's
	      mode.  If allowed they overtype the character under  the	inser-
	      tion  cursor, otherwise they are ignored and the terminal's bell
	      is rung.	Lower case characters are automatically	 converted  to
	      upper  case, if the regular expression filters denies lower case
	      characters but allows upper case characters.

       [10]   FocusIn is bound to display the entry with the reverse attribute
	      for monochrome screens or with swapped foreground and background
	      colors on color screens; additionally, the insertion  cursor  is
	      placed on the very first character in the entry.

       [11]   FocusOut is bound to restore the visual effects of FocusIn, i.e.
	      on mononochrome screens, the reverse attribute  is  removed,  on
	      color screens, the foreground and background colors are restored
	      to their original	 values.  For  integer,	 unsigned,  and	 float
	      modes,  the  entry's value is finally checked using the scan Tcl
	      command.	If the value is legal it is restored into the entry as
	      the return from the scan, thus giving the Tcl canonical form for
	      the value, i.e. no leading zeros for integral values (which oth-
	      erwise  could  be	 interpreted  as  octal numbers) and a decimal
	      point with at least one fractional digit for floating point val-
	      ues  (which otherwise could be interpreted as integral numbers).
	      If the  scan  conversion	fails,	the  value  specified  in  the
	      -default option is stored into the entry.


KEYWORDS
       entry, input



Ck				      8.0			     entryx(n)
