Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttk::combobox background color

1,743 views
Skip to first unread message

yaha...@gmail.com

unread,
Apr 8, 2013, 12:42:56 AM4/8/13
to
I am trying to change the ttk::combobox background on linux to white when the widget state is readonly but none of the options seems to work. On windows the same code gives a white background by default. I tried playing with the style but I was only able to change the font color and the right select arrow using the below code:
ttk::combobox .com -value {1 2 3} -state readonly -style mycombobox.Tcombobox
ttk::style configure mycombobox.TCombobox -background blue -foreground red

is there a way to do it.

Rich

unread,
Apr 8, 2013, 9:12:22 PM4/8/13
to
Does the code snippet at http://wiki.tcl.tk/15780 under:
Questions and Suggestions concerning ttk::combobox
do what you want?

yaha...@gmail.com

unread,
Apr 9, 2013, 12:48:45 AM4/9/13
to
No. What I did with the style came from that page but it did not allow me to change the background.

any other ideas?

Koen Danckaert

unread,
Apr 9, 2013, 5:02:29 AM4/9/13
to
On 09/04/13 06:48, yaha...@gmail.com wrote:
> any other ideas?

ttk::style map TCombobox -fieldbackground {readonly white disabled #d9d9d9}

yaha...@gmail.com

unread,
Apr 14, 2013, 11:07:52 PM4/14/13
to
worked great!!! thanks for the tip
0 new messages