Re: How to setup label foreground colour ?

I found that the easiest way to do it was to use a style file such as:

# Sets the clist attached to the glarea to black background which matchs

# the glarea background
style "blackbase"
  fg[NORMAL]={ 0.8, 0.8, 0.8 }
  base[NORMAL]={ 0.0, 0.0, 0.0 }
  bg[NORMAL]={ 0.0, 0.0, 0.0 }
widget "window3D.*.VariableCTree" style "blackbase"

To do this you also need to export widget names using

"Vladimir V. Markevich" wrote:


I need to setup colour for label widget, (a couple of labels). I want
to use my own style different from default only with colour.

My piece of code is :

$style =  $label->get_style();
$newstyle = $style;
$newstyle->{'fg'} = $color; # the color is gdk colour allocated above

And it does not work ! :(

Please, any suggestion, will be fine !

gtk-perl-list mailing list
gtk-perl-list gnome org

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