button - How to change label's text font in tcltk -


i have gui label , button. when press button new window comes have choose font. part managed it.

it on tcltk site code witch helped me make font window appear. there shown 4 procedures. first , second proc used font window appearance. link is: http://www.tcl.tk/man/tcl/tkcmd/fontchooser.htm

my question is: how can link font choose label's text?

the label widget, text widget, has -font option. you've got make things set up. way in case add following binding (assuming you've got procedures , have made label, geometry-managed it, , stored name in thelabel variable):

bind $thelabel <1> {focus %w; fontchooserfocus %w} 

labels don't take focus, , don't have default key bindings, can forced have focus , that's useful indicate being configured. (this particularly important on osx, font dialog different in how works on other platforms).


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -