Re: re: Fonts

Espen S Johnsen <[email protected]> 15 Apr 2006 22:53:08 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
ephrem boudonnet <[email protected]> writes:

> The widget-modify-font function works. Thanx.
> 
> But it seems to works only for labels?
> Should it work for other widgets? Am I doing something wrong?

The button widget is actually a container (bin) widget that may have any
type of widget as it's child. When a button is created with a text
label, an implicit label widget is created as it's child. So to set the
font of a button it is actually the font of the child that has to be set:

(widget-modify-font (widget-child button) "Bitstream Charter bold 36")

Unfortunately, it gets rather complicated when the button contains both
a label and an icon (eg. a stock button), as the label is no longer a
direct child of the button. In those cases it is probably better to use
resource files.

-- 
Espen


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642