Re: Why doesn't this RC file work?




Chris Bitmead <chris.bitmead@bigfoot.com> writes:

> Why doesn't this simple program using the rc file given, paint the
> button in wierd and wonderful colours?
> 
>    #include <gtk/gtk.h>
>     int main( int   argc, char *argv[] )
>     {
>         GtkWidget *window;
>         GtkWidget *button;
>         
>         gtk_init(&argc, &argv);
>                 gtk_rc_parse("test.gtk");
>         window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>         button = gtk_button_new_with_label ("Hello World");
>                 gtk_widget_set_name(button, "foo");

[...]

> widget "foo.*GtkButton*" style "foo-style"

The full name of your button is:

 GtkWindow.foo

and the label inside it:

 GtkWindow.foo.GtkLabel

you problem meant:

widget "*.foo.*" style "foo-style"

Regards,
                                        Owen



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