Re: Tile widgets: using "cget"
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Tile widgets: using "cget"

From: Joe English <jenglish@flightlab.com>
Date: Thu Sep 29 2005 - 17:10:31 CEST

Adrian Davis wrote:
>
>For example: I'd like to be able to create a label which has the same
>font as an existing (themed) label, but with either or both of the
>underline/bold attributes set and possibly in a different size. What
>would be the recommended Tile method to achieve this?

The Tile widgets uniformly use TIP#145(-inspired) named fonts.
First check if one of the following predefined symbolic font
names are appropriate for your purposes. If so, just use that:

# TkDefaultFont -- default for GUI items not otherwise specified
# TkTextFont -- font for user text (entry, listbox, others).
# TkHeadingFont -- headings (column headings, etc)
# TkCaptionFont -- dialog captions (primary text in alert dialogs, etc.)
# TkTooltipFont -- font to use for tooltip windows

If not, use [font configure TkDefaultFont] (or TkTextFont, or
whichever one you want to use as a base font) to extract the
default -family, -size, and -weight; modify to suit; and create
a new font with those attributes.

(See also library/fonts.tcl for more details).

--Joe English
Received on Sat Oct 15 03:53:36 2005