Re: Change label text color in Gtk 1+



On Fri, 15 Apr 2005 13:11:19 +0200, David Morel <dmorel intradot com> wrote:

Hi all,

Although I found quite a few pages related to this -in my opinion-
simple topic, none othe recipes I tried work. I've been looking for 2
hours and achieved nothing.

All I want is have an individual text label turn red in a window ! How
simpler can it get ? It would most certainly be so easy in GTK2+, but I
have no choice right now :-(

label is transparent, thus you have to create an eventbox under it, and pait that one.

        my $box = new Gtk2::EventBox;
        my $label = new Gtk2::Label('Label');
        my $red = new Gtk2::Gdk::Color(65535,0,0);
        $box->modify_bg('normal',$red);
        $box->add($label);


regards, bostjan




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