diff options
author | jenglish <jenglish@flightlab.com> | 2008-10-28 20:02:03 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-10-28 20:02:03 (GMT) |
commit | 66cc8f9b15845d8a5470409603feec48ee347d5f (patch) | |
tree | 647a4f11655b1ca4253b48284c13448f1fc8b8fa /library/ttk/combobox.tcl | |
parent | c6809cbce555f56fd88713fb23268419af120d54 (diff) | |
download | tk-66cc8f9b15845d8a5470409603feec48ee347d5f.zip tk-66cc8f9b15845d8a5470409603feec48ee347d5f.tar.gz tk-66cc8f9b15845d8a5470409603feec48ee347d5f.tar.bz2 |
Expanded set of symbolic cursors.
Add correct platform-specific cursors for OSX [Bug 2054562]
Use correct cursor for ttk::entry and ttk::combobox widgets [Bug 1534835]
Diffstat (limited to 'library/ttk/combobox.tcl')
-rw-r--r-- | library/ttk/combobox.tcl | 16 |
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. # |