Re: Adding color to a label?



Jeff Shipman wrote:
> Is there a way I can use a GdkColor to set the color
> of a GtkLabel? If not, is there any other way I can
> do it?

Hi Jeff, use gtk_widget_set_style() to set a colour directly, or use
gtk_widget_set_name() to set a name for a widget. 

Once a widget has a name (eg. "red_widget"), you (or your users) can set
the colour from a .gtkrc file ... much nicer! And no messing about with
GtkStyle either.

HTH, John
--
John Cupitt, john cupitt ng-london org uk, +44 (0)20 7747 2570
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN




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