Alexandru schrieb am Dienstag, 15. August 2023 um 07:58:46 UTC+2:
How can I set bold font in a ttk::checkbutton styled with "-style Toolbutton"?
I can define a new style with bold text with:
ttk::style configure Bold.TButton -font MPbold
But then the new style will will not have the "Toolbutton" style.
I need some kind o copy the "Toolbutton" style and then just modify the font.
Thanks
Alexandru
In Manual 8.7:
https://www.tcl.tk/man/tcl8.7/TkCmd/ttk_style.html
DEFINITIONS: ... The “.” style is the theme root style on which derived styles are based.
or
https://tkdocs.com/tutorial/styles.html
# a example:
package require Tk
ttk::button .b0 -text Hello
ttk::button .b1 -text Hello
ttk::button .b2 -text Hello
ttk::button .b3 -text Hello
pack .b0 .b1 .b2 .b3
ttk::style configure Bold.TButton -font MPbold
ttk::style configure Emergency.Bold.TButton -foreground red -padding 10 ttk::style configure Emergency.TButton -foreground red -padding 10
.b1 configure -style "Bold.TButton"
.b2 configure -style "Emergency.TButton"
.b3 configure -style "Emergency.Bold.TButton"
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)