diff options
Diffstat (limited to 'library/demos/combo.tcl')
-rw-r--r-- | library/demos/combo.tcl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl index 8631904..8c17c0e 100644 --- a/library/demos/combo.tcl +++ b/library/demos/combo.tcl @@ -9,7 +9,7 @@ if {![info exists widgetDemo]} { package require Tk set w .combo -catch {destroy $w} +destroy $w toplevel $w wm title $w "Combobox Demonstration" wm iconname $w "combo" @@ -45,10 +45,13 @@ set ozCity Sydney ttk::labelframe $w.c1 -text "Fully Editable" ttk::combobox $w.c1.c -textvariable firstValue ttk::labelframe $w.c2 -text Disabled -ttk::combobox $w.c2.c -textvariable secondValue -state disabled +ttk::combobox $w.c2.c -textvariable secondValue ttk::labelframe $w.c3 -text "Defined List Only" -ttk::combobox $w.c3.c -textvariable ozCity -state readonly \ - -values $australianCities +ttk::combobox $w.c3.c -textvariable ozCity -values $australianCities + +$w.c2.c state disabled +$w.c3.c state readonly + bind $w.c1.c <Return> { if {[%W get] ni [%W cget -values]} { %W configure -values [concat [%W cget -values] [list [%W get]]] |