Tk Source Code

Check-in [0da69ac8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0da69ac895f6edd530d0b0a6f8e97053affb8c30
User & Date: jenglish 2012-01-30 19:50:29
Context
2012-02-10
15:54
* win/tkWinDialog.c (GetFileName): Ensure that we do not convert a result list to a string inadvertently, as this causes problems with Tkinter's handling of multiple filename results. Issue was reported via StackOverflow: http://stackoverflow.com/q/9227859/301832
check-in: 1fff6f6e user: dkf tags: trunk
2012-01-30
19:50
ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561]. check-in: 0da69ac8 user: jenglish tags: trunk
19:44
ttk::combobox::Press: Don't take focus in disabled state [Bug 2925561]. check-in: dfb108b6 user: jenglish tags: core-8-5-branch
2012-01-29
17:19
Bug-3480634: PNG Images missing in menus on Mac check-in: 584ec155 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/ttk/combobox.tcl.

108
109
110
111
112
113
114



115
116
117
118
119
120
121
122
123
124

## Press $mode $x $y -- ButtonPress binding for comboboxes.
#	Either post/unpost the listbox, or perform Entry widget binding,
#	depending on widget state and location of button press.
#
proc ttk::combobox::Press {mode w x y} {
    variable State



    set State(entryPress) [expr {
	   [$w instate {!readonly !disabled}]
	&& [string match *textarea [$w identify $x $y]]
    }]

    focus $w
    if {$State(entryPress)} {
	switch -- $mode {
	    s 	{ ttk::entry::Shift-Press $w $x 	; # Shift }
	    2	{ ttk::entry::Select $w $x word 	; # Double click}







>
>
>

|
|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

## Press $mode $x $y -- ButtonPress binding for comboboxes.
#	Either post/unpost the listbox, or perform Entry widget binding,
#	depending on widget state and location of button press.
#
proc ttk::combobox::Press {mode w x y} {
    variable State

    $w instate disabled { return }

    set State(entryPress) [expr {
	   [$w instate !readonly]
	&& [string match *textarea [$w identify element $x $y]]
    }]

    focus $w
    if {$State(entryPress)} {
	switch -- $mode {
	    s 	{ ttk::entry::Shift-Press $w $x 	; # Shift }
	    2	{ ttk::entry::Select $w $x word 	; # Double click}