combo

Name

combo -- A widget that allows the user to input a small amount of text. (DEPRECATED since GTK+ 2.4).

Synopsis

combo [-option value...]

Screenshot

Options

-allowEmtpty

type: boolean (default: 1)

Whether the entry may be empty.

-caseSensitive

type: boolean (default: 0)

Whether the contents of the entry is matched case sensitive to the elements of the drop down list.

-data

type: string

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

-editable

type: boolean (default: 1)

Whether the text in the entry is editable. To follow the Gnome Human Interface Guidelines (HIG) it is strongly recommended not to use this option. Instead of a combo with non editable entry widget an optionMenu should be used.

-enableArrowsAlways

type: boolean (default: 0)

Whether the arrow keys can be used to step through the items in the list even if the content of the entry does not match to one of the items.

-enableArrowKeys

type: boolean (default: 1)

Whether the arrow keys can be used to step through the items in the list.

-hasFocus

type: 1

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

-items

type: list of strings

The entries of the drop down list.

-mustMatch

type: boolean (default: 0)

Whether the contents of the entry must match one of the elements of the drop down list.

-name

type: string

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

-onChanged

type: string (default: "")

Tcl command which is executed if the value of the combo 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.

-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.

-tooltip

type: string

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

-value

type: string

Value of the item which shall be activated

-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.

Description

The combo widget consists of a single-line text entry field and a drop-down list. The drop-down list is displayed when the user clicks on a small arrow button to the right of the entry field. Instead of a combo widget with non-editable entry field, the use of the optionMenu is recommended. This widget is deprecated since GTK+ 2.4 Use comboEntry instead. .CMD: cget option .CMDDESCR: Returns the value for one option. The option may have any of the values accepted by configure.

Commands

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.

Example

set combo [gnocl::combo -variable var -items {"Cat" "Dog" "Bird"}]
gnocl::window -title "Combo" -child $combo

results in

See also

optionMenu, entry, text, spinButton, GtkCombo