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

changing default font in TCombobox

58 views
Skip to first unread message

rk.n...@gmail.com

unread,
Sep 18, 2015, 11:38:07 AM9/18/15
to
Hi, I am able to change default fonts for many widgets with this code:
::ttk::style configure RK.TCheckbutton -font [list TkDefaultFont 7]
$win configure -style RK.TCheckbutton

However this doesn't work for TCombobox. I guess it is because it is a compound of several widgets. Could someone tell me how to change the font
in its top and dropdown portions? Thanks for any help!

Robert Karen

Harald Oehlmann

unread,
Sep 18, 2015, 12:35:45 PM9/18/15
to
Am Freitag, 18. September 2015 17:38:07 UTC+2 schrieb rk.n...@gmail.com:
> However this doesn't work for TCombobox. I guess it is because it is a compound of several widgets. Could someone tell me how to change the font
> in its top and dropdown portions? Thanks for any help!

Dear Robert,

on the wiki page is a recipt:
wiki.tcl.tk/ttk::combobox

Doesn't it work for you ?

Thank you,
Harald

Brad Lanam

unread,
Sep 18, 2015, 2:47:54 PM9/18/15
to
This page should have all the information you need.
http://wiki.tcl.tk/37973#pagetocfe8b22ab
You can use the options database to set the combobox defaults globally.

For an individual combobox:
.combo -font myfont ; # the entry font
set popdown [ttk::combobox::PopdownWindow .combo]
$popdown.f.l configure -font myfont ; # the font for the dropdown listbox

Harald Oehlmann

unread,
Sep 21, 2015, 4:06:39 AM9/21/15
to
> For an individual combobox:
> .combo -font myfont ; # the entry font
> set popdown [ttk::combobox::PopdownWindow .combo]
> $popdown.f.l configure -font myfont ; # the font for the dropdown listbox

Wow, Brad, great hint.
I didn't know you can do that.

Thank you, I put it on the wiki !

Thanks,
Harald

rk.n...@gmail.com

unread,
Sep 21, 2015, 3:01:28 PM9/21/15
to
Thank you both for responding. Problem solved!

Robert Karen
0 new messages