Re: GtkStyles and RC-Files.

Hi Simon,

Simon Budig <Simon Budig unix-ag org> writes:

> The design involves Buttons in different areas, some are black on white,
> some are white on black. Since it would be overkill to derive
> GtkButtonBW and GtkButtonWB I thought about GtkStyles. Is it possible
> to:
>      1) have two Styles defined in a .gtkrc, named "foobw" and "foowb"
>      2) get these two styles inside an application by their identifier
>      3) make proper GtkStyles from these
>      4) assign these Styles to the Buttons, hardcoded in the application.

simply define your styles in the gtkrc and add lines like

 widget "*foobw*" style "foobw"
 widget "*foowb*" style "foowb"

Then name your buttons "foobw" or "foowb" using gtk_widget_set_name() and 
you are done.

Salut, Sven

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