home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!ghostwind!shmdgljd
- From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
- Subject: patch for tkfonts
- Sender: news@rchland.ibm.com
- Message-ID: <1992Nov23.165238.9010@rchland.ibm.com>
- Date: Mon, 23 Nov 1992 16:52:38 GMT
- Reply-To: jay@vnet.ibm.com
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <1992Nov19.150554.25365@rchland.ibm.com>
- Nntp-Posting-Host: ghostwind.rchland.ibm.com
- Organization: IBM Rochester, MN
- Lines: 45
-
- Apparently, 7x13b must just be a local alias for 7x13bold. Display font
- with Double button 1, rather than just Button1, and Button 3 to close
- the selected font. Also fixes a problem with font names that have spaces,
- e.g., *-new century schoolbook-*. Ray Davis and Don Libes noted the 7x13b
- problem, Ray provided the Button3 to close/Double-1 to display.
-
- I would've posted a context diff, but it'd be as long as the original.
-
- 4c4,5
- < global text
- ---
- > global text font winlist
- > set font [lindex "$args" 0]
- 5a7
- > set winlist($font) $w
- 7c9
- < wm title $w $args
- ---
- > wm title $w "$font"
- 16c18
- < text $w.t1 -font $args \
- ---
- > text $w.t1 -font "$font" \
- 45c47
- < -font 7x13b \
- ---
- > -font 7x13bold \
- 49,50c51,60
- < bind .frame.list <ButtonRelease-1> \
- < { showfont %t [%W get [%W curselection]] }
- ---
- > bind .frame.list <Double-Button-1> \
- > {
- > if { [catch { wm withdraw $winlist([%W get [%W curselection]]) }] } {
- > showfont %t [ %W get [%W curselection]]
- > } else {
- > wm deiconify $winlist([%W get [%W curselection]])
- > }
- > }
- > bind .frame.list <ButtonRelease-3> \
- > { catch { destroy $winlist([%W get [%W curselection]]) } }
-
- --
- : jay jay@vnet.ibm.com My opinions and ideas, not my employer's.
- : shmdgljd@rchland.vnet.ibm.com (c) Copyright 1992. All rights reserved.
-