Colours (colors)



Hi there,

Gtk 1.0.6 Linux
Gtk 1.2.0 Solaris 2.6

I am trying to use the resource file along with a named widget to set the
colour (color for americans) and font of a GtkLabel. Alas without much success
so far :-)

The C source

gtk_set_locale ();
gtk_init (&argc, &argv);
gtk_rc_parse("color.rc");

....

label = gtk_label_new("Some Text");
gtk_widget_set_name(label, "mylabel");
gtk_widget_show(label);

<------------->

The resource file

style "title"
{
	fg[NORMAL] = {1.0, 0.0, 0.0}
	font = "-adobe-helvetica-bold-r-normal--*-140-*-*-*-*-*-*"
}

style "postit"
{
	bg[NORMAL] = {1.0, 1.0, 0.0}
}

widget "mylabel" style "title"
widget_class "*GtkTooltips*" style "postit"

I just can't figure out the correct syntax here. I want only the named label to
have this style not any other widgets at all. Also I can't get a yellow tooltip
either:-((

Any help greatly appreciated this is driving me crazy!

   --

Regards,

Steve Waterworth
stevew@bigeric.force9.co.uk



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