summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-12-17 21:09:46 (GMT)
committerjenglish <jenglish@flightlab.com>2006-12-17 21:09:46 (GMT)
commit7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9 (patch)
tree2e4308ec8e352756daff81632e81c195674ebdef /library/ttk
parent916e70fb90cb972726e8e580ff8dabf5e3da7aa1 (diff)
downloadtk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.zip
tk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.tar.gz
tk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.tar.bz2
Add combobox -height option; only show scrollbar if the listbox
needs to scroll [#1032869].
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/combobox.tcl9
1 files changed, 6 insertions, 3 deletions
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index 6c7099c..5af7a2d 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -1,5 +1,5 @@
#
-# $Id: combobox.tcl,v 1.2 2006/11/27 06:53:55 jenglish Exp $
+# $Id: combobox.tcl,v 1.3 2006/12/17 21:09:46 jenglish Exp $
#
# Ttk widget set: combobox bindings.
#
@@ -275,8 +275,11 @@ proc ttk::combobox::Post {cb} {
$popdown.l see $current
# Should allow user to control listbox height
set height [llength $values]
- if {$height > 10} {
- set height 10
+ if {$height > [$cb cget -height]} {
+ set height [$cb cget -height]
+ grid $popdown.sb
+ } else {
+ grid remove $popdown.sb
}
$popdown.l configure -height $height
update idletasks