Tk Source Code

Check-in [dfb108b6]
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 | core-8-5-branch
Files: files | file ages | folders
SHA1: dfb108b671df74557c9d10e49df49b99cdb4e375
User & Date: jenglish 2012-01-30 19:44:38
Context
2012-02-10
15:51
* win/tkWinDialog.c (GetFileNameW): 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: c309fddc user: dkf tags: core-8-5-branch
2012-01-31
22:24
[Bug-1630262]: segfault when deleting lines with peer text widgets check-in: abca82f4 user: fvogel tags: bug-1630262
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:12
Bug 3480634: PNG Images missing in menus on Mac check-in: 11b15014 user: jan.nijtmans tags: core-8-5-branch
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}