summaryrefslogtreecommitdiffstats
path: root/library/ttk/combobox.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/ttk/combobox.tcl')
-rw-r--r--library/ttk/combobox.tcl16
1 files changed, 15 insertions, 1 deletions
diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl
index 2f4838f..1cb325c 100644
--- a/library/ttk/combobox.tcl
+++ b/library/ttk/combobox.tcl
@@ -1,5 +1,5 @@
#
-# $Id: combobox.tcl,v 1.12 2008/02/23 18:41:07 jenglish Exp $
+# $Id: combobox.tcl,v 1.13 2008/10/28 20:02:03 jenglish Exp $
#
# Combobox bindings.
#
@@ -60,6 +60,7 @@ bind TCombobox <Shift-ButtonPress-1> { ttk::combobox::Press "s" %W %x %y }
bind TCombobox <Double-ButtonPress-1> { ttk::combobox::Press "2" %W %x %y }
bind TCombobox <Triple-ButtonPress-1> { ttk::combobox::Press "3" %W %x %y }
bind TCombobox <B1-Motion> { ttk::combobox::Drag %W %x }
+bind TCombobox <Motion> { ttk::combobox::Motion %W %x %y }
bind TCombobox <MouseWheel> { ttk::combobox::Scroll %W [expr {%D/-120}] }
if {[tk windowingsystem] eq "x11"} {
@@ -152,6 +153,19 @@ proc ttk::combobox::Drag {w x} {
}
}
+## Motion --
+# Set cursor.
+#
+proc ttk::combobox::Motion {w x y} {
+ if { [$w identify $x $y] eq "textarea"
+ && [$w instate {!readonly !disabled}]
+ } {
+ ttk::setCursor $w text
+ } else {
+ ttk::setCursor $w ""
+ }
+}
+
## TraverseIn -- receive focus due to keyboard navigation
# For editable comboboxes, set the selection and insert cursor.
#