summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2007-10-23 17:09:09 (GMT)
committerjenglish@flightlab.com <jenglish>2007-10-23 17:09:09 (GMT)
commit466110ee5f59264cef142b43e86c4b052d6afbdb (patch)
tree50f6d517bfc6c26700e0cd4ce8805b82e19edba3
parent67057ef68fc0064d27b61ce0e6b7e2099710fda6 (diff)
downloadtk-466110ee5f59264cef142b43e86c4b052d6afbdb.zip
tk-466110ee5f59264cef142b43e86c4b052d6afbdb.tar.gz
tk-466110ee5f59264cef142b43e86c4b052d6afbdb.tar.bz2
[namespace import ::ttk::scrollbar] doesn't work,
since ttk::scrollbar isn't [namespace export]ed.
-rw-r--r--ChangeLog5
-rw-r--r--library/ttk/combobox.tcl11
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d3057e..1c37726 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-23 Joe English <jenglish@users.sourceforge.net>
+
+ * library/ttk/combobox.tcl: [namespace import ::ttk::scrollbar]
+ doesn't work, since ttk::scrollbar isn't [namespace export]ed.
+
2007-10-23 Don Porter <dgp@users.sourceforge.net>
* tests/cursor.test: Make tests robust against changes in Tcl's
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index a5ae8a3..1bcca30 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -1,5 +1,5 @@
#
-# $Id: combobox.tcl,v 1.5 2007/10/22 03:35:14 jenglish Exp $
+# $Id: combobox.tcl,v 1.6 2007/10/23 17:09:09 jenglish Exp $
#
# Combobox bindings.
#
@@ -221,8 +221,9 @@ proc ttk::combobox::UnmapPopdown {w} {
namespace eval ::ttk::combobox {
# @@@ Until we have a proper native scrollbar on Aqua, use
# @@@ the regular Tk one. Use ttk::scrollbar on other platforms.
- if {[tk windowingsystem] ne "aqua"} {
- namespace import -force ::ttk::scrollbar
+ variable scrollbar ttk::scrollbar
+ if {[tk windowingsystem] eq "aqua"} {
+ set scrollbar ::scrollbar
}
}
@@ -231,10 +232,12 @@ namespace eval ::ttk::combobox {
# creating it if necessary.
#
proc ttk::combobox::PopdownWindow {cb} {
+ variable scrollbar
+
if {![winfo exists $cb.popdown]} {
set popdown [PopdownToplevel $cb.popdown]
- scrollbar $popdown.sb \
+ $scrollbar $popdown.sb \
-orient vertical -command [list $popdown.l yview]
listbox $popdown.l \
-listvariable ttk::combobox::Values($cb) \