Tk Source Code

View Ticket
Login
Ticket UUID: c492c96aa2579b5fbe152c45912c2373a99fc5c7
Title: Combobox arrow not grayed
Type: Patch Version: 8.6.6
Submitter: danckaert Created on: 2017-02-08 10:46:13
Subsystem: 88. Themed Tk Assigned To: fvogel
Priority: 6 Severity: Minor
Status: Closed Last Modified: 2017-02-22 19:53:37
Resolution: Fixed Closed By: fvogel
    Closed on: 2017-02-22 19:53:37
Description:
When a combobox is in the disabled state, its arrow is not grayed on Unix. This can be fixed by inserting the following in the styles altTheme, clamTheme and defaults.tcl in library/ttk:

ttk::style map TCombobox -arrowcolor [list disabled $colors(-disabledfg)]
User Comments: fvogel added on 2017-02-22 19:53:37:
Merged to core-8-6-branch and trunk.

Thanks again for the report and even more for the patch!

fvogel added on 2017-02-09 19:29:50:
Thanks for your answer. I have grouped the multiple [style map TCombobox] statements into a single instructions.

danckaert added on 2017-02-09 09:00:11:
Looks good. Maybe it's better to add the options to the already existing [style map TCombobox] statements (although this really doesn't matter).

I looked at the TSpinbox style, which already has the arrowcolor bindings. I suppose the Windows and Mac themes don't need them because they have native bindings. In Motif, the background of the arrow is grayed when disabled.

fvogel added on 2017-02-08 18:26:05:

Thanks for the report and for the patch!

Test script:

package require Tk
pack [ttk::combobox .c]
.c configure -state disabled

I have committed the patch in a branch for easy testing: [e90562e585]

Following your report I have changed the alt, clam and default themes only. Why is there no need to modify the other themes accordingly, e.g. aqua or motif?