Re: problem with modify_fg

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

 



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@xxxxxxxxx>
To: "oded" <o@xxxxxxxxxxx>
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@xxxxxxxxxxx> 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@xxxxxxxxx
>> http://mail.gnome.org/mailman/listinfo/gtk-list
>>
>
> 

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux