COMBOBOX(1)

NAME
ComboBox - a ComboBox widget for Tk4.0

SYNOPSIS
ComboBox pathName ?options?

DESCRIPTION
This Tcl code implements a basic ComboBox widget for Tk4.0. The clever bit is that you can access the widget's internals just like you would any other Tk4.0 widget (well, almost :-). This is accomplished by creating a new proc with the same name as the widget. This proc lets the programmer do things like "<widget-name> configure" and <widget-name> cget" and so on.

I have borrowed (isn't that the Tcl way ?) some code from Ioi's excellent Tix widget set and some stuff from Zircon. I wrote this widget because I didn't want to add yet another extension to my interpreter and I preffered something done entirely in Tcl.

For a quick demo run the program ComboBox.test

STANDARD OPTIONS
Most standard options like font, fg, bg, cursor, highlightthickness, etc. are supported. The switches are named differently though since we have multiple underlying widgets. Read on.

WIDGET-SPECIFIC OPTIONS
These options are currently supported by the ComboBox widget.

WIDGET COMMAND
The ComboBox command creates a new Tcl command whose name is pathName. This command is 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 behaviour of the command. The following commands are currently supported by the ComboBox widget: Adds zero or more new elements to the list. Elements are added at the end !! This will go away soon ! Returns the current value of the configuration option given by option. All the widget specific options listed above can be queried with this command. Clears the entry widget. Deletes one or more elements of the list. first and last are indices specifying the range of elements to delete. If last isn't specified, only one element is deleted. Modify any of the widget specific configuration options listed above. This command cannot be used to query the value of the option ! Use pathName cget instead.

EXAMPLES
# Use auto_path or loadlibindex or just source in the code source ComboBox.tcl

ComboBox .cbox -ewidth 15 -listheight 6 -lbltext "Demo" -ehighlightthickness 0 -ebg AliceBlue -efg DarkSlateBlue -strict 1 -listwidth 4

 .cbox add "foo bar" "foo ugh" "foo bar ugh"
 .cbox set foobarugh
 .cbox configure -listfg green4 -listbg azure2
puts "ComboBox contains value [.cbox get]"

AUTHORS
Ashutosh Joglekar, Nov 21 1995, ashutosh@panix.com OR ajogleka@ltcm.com

NOTES
The ComboBox does a grab on the global focus !

KEYWORDS
ComboBox, widget, options, listbox, entry, wm