Re: tooltip colors w/o theme



> Use gtk_widget_set_name() to name your tooltip widget "tooltip_widget",
> and it'll pick up the colour and font. You can use
> gtk_rc_add_default_file() to add the rc file for your app (so you don't
> need to touch ~/.gtkrc).

I am having trouble doing this. Whenever I use gtk_widget_set_name()
I get errors that my tooltip widget is not a GtkWidget. Sure enough,
it's a GtkTooltips. So, then I tried doing casting, but that
doesn't work. So I tried having my widget be a GtkWidget, but then
I'm running into problems with gtk_tooltips_new() because it
returns a GtkTooltips.

So then I tried something like:

widget_class "GtkTooltips" style "tooltip_style"
widget_class "*GtkTooltips" style "tooltip_style"
class "GtkTooltips" style "tooltip_style"
class "*GtkTooltips" style "tooltip_style"

and I couldn't get any of those to work. So, now my
file looks like this:

#style for tooltips
style "tooltip_style" = "default"
{
   bg[NORMAL] = "#FFFE4BC4B"
}

class "GtkTooltips" style "tooltip_style"

and I'm calling it like this:

/* Initialize Tooltips */
ToolTips = gtk_tooltips_new();
gtk_tooltips_set_delay(ToolTips, 1000);
gtk_rc_add_default_file("/u/jeff/xt3_gtkrc");


What am I doing wrong?

Jeff "Shippy" Shipman     E-Mail: shippy nmt edu
Computer Science Major    ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy








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