Re: How to get Styles for Label Widget



On Tuesday, September 30, 2003, at 01:51 AM, parakala suma wrote:

Trying to get Bold letters in LABEL WIDGET can any one
help me

use pango markup.

$label->set_markup ("here is some <b>bold text</b>");

http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html#gtk-label-set- markup
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html


or use a style modifier:

$label->modify_font (...)
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget- modify-font


or create a new style altogether and attach it to the widget:

$style = $label->get_style->copy;  # COPY!
... = $style->font_desc;
$label->set_style ($style);

NOTE: this last way may be imcompletely implemented. i've had success with the other two ways and have had no need for this. anybody else have different experience?

--
muppet <scott at asofyet dot org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]