Re: can't change color of label
- From: Torsten Luettgert <t luettgert pressestimmen de>
- To: oded <o sadglad com>
- Cc: gtkmm-list gnome org
- Subject: Re: can't change color of label
- Date: Tue, 29 Aug 2006 13:16:40 +0200
On Di, 2006-08-29 at 11:34 +0200, oded wrote:
> Hello!
[...]
> I tried also to inilize the color using set_rgb, or without allocating it,
> or to use modify_text, and modify_base, or to create a style and use
> modify_style, or use label->set_state(Gtk::STATE_NORMAL); or use
> label->set_use_markup(false);
> but to no avail, it still remains black.
You can use pango markup for that, it's really cool.
label->set_use_markup(true);
then write the text like
<span foreground="red">TextText</span>
Here's what markup can do for you:
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html
Hth,
Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]