[ltk-user] Bold font for label

syll-dev at laposte.net syll-dev at laposte.net
Tue Jan 17 01:24:08 UTC 2012


> > So I can't find the font used for "normal" labels. I would like to
> > say : "the default font with default properties, but weight=bold". I
> > can use :font "Helvetica 10 bold", but not juste :font "bold".
> 
> Why do not subclass the label widget?
> 
> something like:
> 
> (defclass my-label (ltk:label)
> ())
> 
> (defmethod initialize-instance :after ((object my-label) &key (font-name "sans") (font-size 10))
> (configure object "font" (format nil "~a ~a" font-name font-size)))
> 
> 
> This way cget should always return something meaningful.
> Then you can add method to change only the weigth of the font.
> 
> This code is not tested of course, no warranty for any purpouse! :)

This could help me to have the same font for all labels, but not everywhere in the application because I can't get a "modified default font". But I keep your idea in mind :) .

Thank you for your help.

Syll


Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net




More information about the ltk-user mailing list