entryfield - Create and manipulate a entry field widget

SYNOPSIS

entryfield pathName ?options?

INHERITANCE

itk::Widget <- LabeledWidget <- entryfield

STANDARD OPTIONS

background
foreground
insertBorderWidth
justify
selectForeground
borderWidth
highlightColor
insertOffTime
relief
textVariable
cursor
highlightThickness
insertOnTime
selectBackground
width
exportSelection
insertBackground
insertWidth
selectBorderWidth

See the "options" manual entry for details on the standard options.

ASSOCIATED OPTIONS

show
state

See the "entry" manual entry for details on the associated options.

INHERITED OPTIONS

disabledForeground
labelMargin
state
labelBitmap
labelPos
labelFont
labelText
labelImage
labelVariable

See the "labeledwidget" class manual entry for details on the inherited options.

WIDGET-SPECIFIC OPTIONS

Name:                   childSitePos
Class:                  Position
Command-Line Switch:	-childsitepos

Name:                   command
Class:                  Command
Command-Line Switch:	-command

Name:                   fixed
Class:                  Fixed
Command-Line Switch:	-fixed

Name:                   focusCommand
Class:                  Command
Command-Line Switch:	-focuscommand

Name:                   invalid
Class:                  Command
Command-Line Switch:	-invalid

Name:                   textBackground
Class:                  Background
Command-Line Switch:	-textbackground

Name:                   textFont
Class:                  Font
Command-Line Switch:	-textfont

Name:                   validate
Class:                  Command
Command-Line Switch:	-validate
%c
Replaced with the current input character.
%P
Replaced with the contents of the entryfield modified to include the latest keystoke. This is equivalent to peeking at the future contents, enabling rejection prior to the update.
%S
Replaced with the current contents of the entryfield prior to the latest keystroke being added.
%W
Replaced with the entryfield widget pathname.


DESCRIPTION

The entryfield command creates an enhanced text entry widget with an optional associated label. Addtional options support validation and establishing a upper limit on the number of characters which may be entered in the field.

METHODS

The entryfield command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:

pathName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for entryfield widgets:

ASSOCIATED METHODS

delete
insert
get
scan
icursor
selection
index
xview

See the "entry" manual entry for details on the associated methods.

WIDGET-SPECIFIC METHODS

pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the entryfield command.
pathName childsite
Returns the path name of the child site.
pathName clear
Clear entry widget
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, 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 option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the entryfield command.

COMPONENTS

Name:                   efchildsite
Class:                  frame

Name:                   entry
Class:                  entry

EXAMPLE

 option add *textBackground white
 
 proc returnCmd {} {
     puts stdout "Return Pressed"
 }
 
 proc invalidCmd {} {
     puts stdout "Alphabetic contents invalid"
 }
 
 entryfield .ef -command returnCmd
 
 entryfield .fef -labeltext "Fixed:" -fixed 10 -width 12
 
 entryfield .nef -labeltext "Numeric:" -validate numeric -width 12
 
 entryfield .aef -labeltext "Alphabetic:" \\
    -validate alphabetic -width 12 -invalid invalidCmd
 
 entryfield .pef -labeltext "Password:" \\
    -show \267 -width 12 -command returnCmd
 
 Labeledwidget::alignlabels .ef .fef .nef .aef .pef

 pack .ef -fill x -expand yes -padx 10 -pady 5
 pack .fef -fill x -expand yes -padx 10 -pady 5
 pack .nef -fill x -expand yes -padx 10 -pady 5
 pack .aef -fill x -expand yes -padx 10 -pady 5
 pack .pef -fill x -expand yes -padx 10 -pady 5

AUTHORS

Sue Yockey

Mark L. Ulferts

KEYWORDS

entryfield, widget