I'm beginning to use Tile and I would like to be able to change the
font color/size and background color of the checkbutton widget on an
individual basis. I understand that I can use style to change it for
all of the checkbuttons, but I need to do it one-by-one. It seems like
I need the -style option on checkbutton, but I'm not sure what to do.
ttk::checkbutton -text "mytext" -variable myvar -style ???
Also how can I return what the name and size of the current font is in
Tile for a particular widget?
Thanks,
Bob Lipman
>I'm beginning to use Tile and I would like to be able to change the
>font color/size and background color of the checkbutton widget on an
>individual basis. I understand that I can use style to change it for
>all of the checkbuttons, but I need to do it one-by-one.
If you need to do this sort of thing, then you probably don't want
to use the Tile widgets. Stick with core Tk checkbuttons; the
Tile checkbutton isn't designed to accommodate this usage pattern.
>Also how can I return what the name and size of the current font is in
>Tile for a particular widget?
Unless you've explicitly specified something different, it's TkDefaultFont.
(Exceptions: ttk::treeview widgets use *two* fonts -- TkDefaultFont
and TkHeadingFont -- and ttk::entry widgets use TkTextFont.)
Use [font configure TkDefaultFont] to find out the size, weight,
and family of the default UI font on the current platform; and
see $tile_libdir/fonts.tcl and TIP#145 for details on how it
gets chosen.
--Joe English