From db857541027a99a15e0e2b862d96a162abd06c09 Mon Sep 17 00:00:00 2001 From: "jenglish@flightlab.com" Date: Mon, 30 Jan 2012 19:44:38 +0000 Subject: ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561]. --- library/ttk/combobox.tcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl index eab3e1a..03821a2 100644 --- a/library/ttk/combobox.tcl +++ b/library/ttk/combobox.tcl @@ -112,9 +112,12 @@ switch -- [tk windowingsystem] { # proc ttk::combobox::Press {mode w x y} { variable State + + $w instate disabled { return } + set State(entryPress) [expr { - [$w instate {!readonly !disabled}] - && [string match *textarea [$w identify $x $y]] + [$w instate !readonly] + && [string match *textarea [$w identify element $x $y]] }] focus $w -- cgit v0.12