clist text color question

Hi have a clist and for one particular row in it,
I want to change the color of the text.

What is the right way to do this?

I tried this

in the show event for the window, I populate the data
for the list, depending on some condition, i want the color
to change for the row.  so i tried this to change
the color:

      my $colormap = Gtk::Gdk::Colormap->get_system;
      my $newstyle = new Gtk::Style;

      my $color = $colormap->color_alloc({red => 255,
                                          green => 0,
                                          blue => 0 });

      $newstyle->fg('normal', $color);
      $clist->set_row_style($rownumber, $newstyle);

this didnt work.

anyone know what the *right* way to do something like
this would be?

thanks in advance!


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