Posted to tcl by patthoyts at Mon Apr 21 10:33:49 GMT 2008view pretty
proc ::tk::console::ChooseFont {} { variable fontChooser if {[llength [info command ::tk_chooseFont]] == 0} { return } if {[dict get $fontChooser action] eq "show"} { ::tk::choosefont configure \ -parent .console \ -font TkConsoleFont \ -command [namespace code [list ApplyFont]] ::tk::choosefont show if {[set index [dict get $fontChooser index]] != -1} { .menubar.edit entryconfigure $index -label [msgcat::mc "Hide Fonts"] dict set fontChooser action "hide" } } else { ::tk::choosefont hide if {[set index [dict get $fontChooser index]] != -1} { .menubar.edit entryconfigure $index -label [msgcat::mc "Show Fonts"] dict set fontChooser action "show" } } } proc ::tk::console::ApplyFont {font} { font configure TkConsoleFont {*}[font actual $font] }