Again, thanks for taking the time to respond.
I should mention I am usng Tcl 8.6.8 on win7x64
I've gone over the two pages you referenced. In addition to
left-adjusting the text in a button, I also want to change the font for
a labelframe. I saw the heading for ttk::labelframe on the
"Changing+Widget+Colors" page and I decided to see if I could derive
that information myself.
First of all:
% font create B {*}[font configure TkHeadingFont] -weight bold -size 14
B
% ttk::style configure TLabelframe.Label -font B
% ttk::labelframe .lframe -width 100 -height 50 -text "My Heading"
.lframe
% pack .lframe
It works, great! Now, is there a way I could have figured that out myself?
I'll restart tkcon and start with the theme.
% ttk::style theme settings vista
wrong # args: should be "ttk::style theme settings theme script"
Nope.
% lsearch -inline -all -nocase [ttk::style element names] *frame*
ComboboxPopdownFrame.background
Nothing related to a labelframe. (I did look at the entire list but saw
nothing related to labelframe's)
Now, I'm just making guesses:
% ttk::style layout TLabelframe
Labelframe.border -sticky nswe
Nothing to do with the font.
% ttk::style configure TLabelframe
% ttk::style map TLabelframe
% ttk::style lookup TLabelframe
wrong # args: should be "ttk::style lookup style -option ?state? ?default?"
I don't have an "option" name; that's what I'm trying to find.
Making a wild guess:
% ttk::style lookup TLabelframe -font
TkDefaultFont
Finally, I think I'm getting somewhere. So:
% font create B ...
B
% ttk::style configure TLableframe -font B
% ttk::labelframe .lframe -width 100 -height 50 -text Heading
.lframe
% pack .lframe
Did not work.
Francois' response above led me to the 8.6.10 man pages. >That< is what
I was looking for! The 8.6.8 man pages do not have that information.
Where did your example "TLabelframe.Label" come from? How did you find
that? From the 8.6.10 man page?
I do want to ask: could I have found your solution for 8.6.8?
% ttk::style configure TLabelframe.Label -font B
Would I have to dig into the source in lib/tk8.6/ttk? If so, I hope that
8.6.10 has better introspection options for the ttk widgets.