From a5ce701b3c9e1a38ff7dfdd113a257ae677cf153 Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 6 Nov 2007 02:15:55 +0000 Subject: * library/ttk/combobox.tcl: Set focus to listbox in binding instead of in Post command (see #1349811 for info). --- ChangeLog | 5 +++++ library/ttk/combobox.tcl | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 187832f..167a5ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-05 Joe English + + * library/ttk/combobox.tcl: Set focus to listbox in binding + instead of in Post command (see #1349811 for info). + 2007-11-05 Andreas Kupries * doc/CrtConsoleChan.3: New file providing minimal documentation diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl index d19a1fd..2c65395 100644 --- a/library/ttk/combobox.tcl +++ b/library/ttk/combobox.tcl @@ -1,5 +1,5 @@ # -# $Id: combobox.tcl,v 1.9 2007/10/31 04:25:23 jenglish Exp $ +# $Id: combobox.tcl,v 1.10 2007/11/06 02:15:55 jenglish Exp $ # # Combobox bindings. # @@ -28,12 +28,16 @@ # The "noActivates" attribute prevents the parent toplevel # from deactivating when the popdown is posted, and is also # necessary for "help" windows to receive mouse events. -# "hideOnSuspend" makes the popdown disappear (resp. reappear) +# "hideOnSuspend" makes the popdown disappear (resp. reappear) # when the parent toplevel is deactivated (resp. reactivated). # (see [#1814778]). Also set [wm resizable 0 0], to prevent # TkAqua from shrinking the scrollbar to make room for a grow box # that isn't there. # +# In order to work around other platform quirks in TkAqua, +# [grab] and [focus] are set in bindings instead of +# immediately after deiconifying the window. +# namespace eval ttk::combobox { variable Values ;# Values($cb) is -listvariable of listbox widget @@ -67,7 +71,6 @@ bind TCombobox <> { ttk::combobox::TraverseIn %W } ### Combobox listbox bindings. # -bind ComboboxListbox { focus %W ; continue } bind ComboboxListbox { ttk::combobox::LBSelected %W } bind ComboboxListbox { ttk::combobox::LBSelected %W } bind ComboboxListbox { ttk::combobox::LBCancel %W } @@ -75,6 +78,7 @@ bind ComboboxListbox { ttk::combobox::LBTab %W next } bind ComboboxListbox <> { ttk::combobox::LBTab %W prev } bind ComboboxListbox { ttk::combobox::LBCleanup %W } bind ComboboxListbox { ttk::combobox::LBHover %W %x %y } +bind ComboboxListbox { focus -force %W } switch -- [tk windowingsystem] { win32 { @@ -286,7 +290,7 @@ proc ttk::combobox::PopdownWindow {cb} { ## PopdownToplevel -- Create toplevel window for the combobox popdown # # See also <> -# +# proc ttk::combobox::PopdownToplevel {w} { toplevel $w -class ComboboxPopdown wm withdraw $w @@ -389,7 +393,6 @@ proc ttk::combobox::Post {cb} { # wm deiconify $popdown raise $popdown - focus $popdown.l } ## Unpost $cb -- -- cgit v0.12