gtk_tooltips_set_colors, how to use it correctly
- From: Jörgen Tegnér <teg post netlink se>
- To: gtk-list redhat com
- Subject: gtk_tooltips_set_colors, how to use it correctly
- Date: Wed, 27 Oct 1999 23:00:25 +0200
Hi list,
I need some help in correctly using the gtk_tooltips_set_colors function. I have tried
by putting the snippet below into examples/buttons.c, but it does not change the colour of the
tooltip. So, how should it be done?
Thanks,
Jörgen Tegnér
...
GtkTooltips *tip;
GdkColor fg,bg;
GdkColormap *map;
...
/* Connect the "clicked" signal of the button to our callback */
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (callback), (gpointer) "cool button");
tip = gtk_tooltips_new();
map = gdk_colormap_get_system();
fg.red=bg.green=0xffff;
fg.green=fg.blue=bg.red=bg.blue=0;
if(!gdk_color_alloc(map,&fg))
g_error("could not alloc foreground color");
if(!gdk_color_alloc(map,&bg))
g_error("could not alloc background color");
gtk_tooltips_set_colors(tip,&fg,&bg);
gtk_tooltips_set_tip(tip,button,"Hello tip","some private string");
gtk_tooltips_enable(tip);
/* This calls our box creating function */
box1 = xpm_label_box(window, "info.xpm", "cool button")
...
--
Hi! I'm a .signature virus. Copy me into ~/.signature to help me spread!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]