Reputation:
I have a Tcl/Tk app that generates many forms and would like to be able to configure the default widget fonts from a central location without having to configure each widget with the -font
switch.
#!<path>/wish
button .hello -text "Hello, World!" -command { exit }
pack .hello
puts "--- i would like to set this thing: [.hello configure -font] --- "
Upvotes: 6
Views: 6984
Reputation: 848
Try adding,
font create myDefaultFont -family Helvetica -size 20
option add *font myDefaultFont
to the top of your script. (link to article on fonts)
Upvotes: 13