Re: problem with modify_fg
- From: oded <o sadglad com>
- To: gtk-list gnome org
- Subject: Re: problem with modify_fg
- Date: Tue, 29 Aug 2006 14:53:59 +0200
Problem solved,
The problem was that I thought the values for set_rgb are 8 bit, while they
are 16 bit.
so the value that I used ( 0,0,255 ) is very close to 0,0,0 which is black.
Thanks,
Oded.
----- Original Message -----
From: "chao yeaj" <yeajchao gmail com>
To: "oded" <o sadglad com>
Sent: Tuesday, August 29, 2006 7:54 AM
Subject: Re: problem with modify_fg
In GTK+ 2.0,
the following lines maybe work
//********************************************
GdkColor color;
gdk_color_parse ("red", &color);
gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &color);
//***********************************************************
On 8/28/06, oded <o sadglad com> wrote:
Hello,
I am using Gtkmm, and I am new to it and to Gtk.
I'v got a Gtk::Label widget, and I'm trying to change it's forground
color,
but it remain black.
Here is the code where I try to change the color of the widget, which has
been inilized earlier in the program, and has already been displayed.
Gdk::Color color;
color.set_rgb(0,0,255);
m_label->modify_fg(Gtk::STATE_NORMAL, color);
m_label->modify_fg(Gtk::STATE_ACTIVE, color);
m_label->modify_fg(Gtk::STATE_INSENSITIVE, color);
m_label->modify_fg(Gtk::STATE_PRELIGHT, color);
m_label->modify_fg(Gtk::STATE_SELECTED, color);
Thanks,
Oded.
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]