entry

Name

entry -- A widget which allows the user to input a small amount of text.

Synopsis

entry [-option value...]

Screenshot

Options

-data

type: string

User defined data which can be retrieved via the cget subcommand.

-editable

type: boolean (default: true)

Whether the the entry is editable.

-hasFocus

type: 1

This sets the focus to the widget. To unset the focus it must be set to another widet.

-heightGroup

type: string (default: "")

heightGroup can be an arbitrary string. All widgets with the same heightGroup request the same height. If packed with the fill flag set, they will have nevertheless different heights.

-maxLength

type: integer (default: -1)

Maximum length of entry value (-1 means not limited).

-name

type: string

Name of the widget, can be used to set options in an rc file.

-onActivate

type: string (default: "")

Tcl command which is executed if Enter is pressed in the entry. Before evaluation the following percent strings are substituted: TABLE %% | % %w | widget name. TABLE

-onChanged

type: string (default: "")

Tcl command which is executed if the value of the entry is changed via the GUI. Before evaluation the following percent strings are substituted: TABLE %% | % %w | widget name. %v | value of the active item TABLE This command is not called if the value is changed via the option -value.

-onRealize

type: string (default: "")

Tcl command whih is executed in the global scope if the widget has been realized. Before evaluation the following percent strings are substituated: TABLE %% | % %w | widget name. TABLE

-onShowHelp

type: string (default: "")

Tcl command which is executed in the global scope if the "show-help" signal is recieved, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituated TABLE %% | % %w | widget name %h | help type: either "whatsThis" or "tooltip" TABLE

-sensitive

type: boolean (default: 1)

Whether or not the item is sensitve to user input.

-sizeGroup

type: string (default: "")

sizeGroup can be an arbitrary string. All widgets with the same sizeGroup request the same size. If packed with the fill flag set, they will have nevertheless different sizes.

-tooltip

type: string

Message that appear next to this widget when the mouse pointer is held over it for a short amount of time.

-textVisible

type: boolean (default: true)

Whether the text is visible.

-value

type: string (default: "")

Text of the entry.

-variable

type: string (default: "")

name of a (global) variable which is changed whenever the entry is changed

-visible

type: boolean (default: 1)

Whether or not the item is visible.

-widthChars

type: integer

Size of the widget in characters.

-widthGroup

type: string (default: "")

widthGroup can be an arbitrary string. All widgets with the same widthGroup request the same width. If packed with the fill flag set, they will have nevertheless different widths.

Description

A entry widget lets the user input some text.

Commands

id cget option

Returns the value for one option. The option may have any of the values accepted by configure.

id configure [-option value...]

Configures the widget. Option may have any of the values accepted on creation of the widget.

id delete

Deletes the widget and the associated tcl command.

id onChanged

Executes the command given by the -onChanged option.

Example


set entry [gnocl::entry -variable entryText -value foo]
gnocl::window -title "Entry" -child $entry 

results in

See also

text, combo, spinButton, GtkEntry