Re: [gtk-list] gtk rc file



On Mon, 8 Jun 1998, Stefan Davids wrote:

> 
> I can't seem to get the rcfile to behave as in the Gtk tutorial. I'm
> trying to use different styles for different buttons, so I have somthing
> like:
> 
> 	button = gtk_button_new_with_label("Some text");
> 	gtk_widget_set_name (button, "Label");
> 
> in my program and then something like
> 
> 	widget_class "Label.GtkButton" style "button_style"

`widget_class' is the keyword to add a style to a wildcard pattern that
matches against a parent.child path of a widget, e.g.

GtkWindow.GtkHBox.GtkButton

`widget' is the keyword to add a style to a wildcard pattern that matches
against a parent.child path made up of gtk_widget_get_name(), e.g.

GtkWindow.GtkHBox.Label (if you named the button "Label" like in your
                           above example)

so you would like to use "*Label" as a pattern for your code.

> 
> in the rcfile. The above doesn't do anything, although setting 
> 
> 	widget_class "*GtkButton*" style "button"
> 
> will set the style for all the buttons, so the rcfile is getting parsed.
> My reading of the tutorial is that the above should work, although it does
> have [<--- Verify ME!] by it so I guess whoever wrote it was a bit
> dubious....
> 
> Am I being thick? Has anyone got this to work? Can anyone point me in the
> right direction? I'm using Gtk 1.0.4.
> 
> TIA
> 
> Stefan
> 

---
ciaoTJ



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