Re: [gtk-list] how do i set the tooltip color?
- From: "Donna S. Martin" <donna omartin com>
- To: <gtk-list redhat com>
- Subject: Re: [gtk-list] how do i set the tooltip color?
- Date: Fri, 18 Feb 2000 10:01:10 -0700
You are having problems setting the tooltips
color from within your program because.....
you can't. Regardless of what the documentation
says about gtk_tooltips_set_color() it is a no-op.
There has been some discussion about this in the
archives, the main point being tooltips colors
are to be user preference...so can be set in a
style or with a theme.
HTH,
Donna
----- Original Message -----
From: David Benson <daveb@idealab.com>
To: <gtk-list@redhat.com>
Sent: Thursday, February 17, 2000 7:17 PM
Subject: [gtk-list] how do i set the tooltip color?
> I cannot seem to set the tooltip color, and I don't know why...
>
> Here is my test program, which doesn't print any errors,
> but also has a tooltip w/ default colors...
>
>
> ===== CUT
> #include <gtk/gtkbutton.h>
> #include <gtk/gtkmain.h>
> #include <gtk/gtkwindow.h>
> #include <gtk/gtktooltips.h>
>
> int main(int argc, char** argv)
> {
> GtkWidget* widget;
> GtkWidget* window;
> GtkTooltips* tooltips;
> gboolean succeeded;
> GdkColor colors[2];
>
> gtk_init(&argc, &argv);
>
> colors[0].red = 65535; /* red and green */
> colors[0].green = 0;
> colors[0].blue = 0;
> colors[1].red = 0;
> colors[1].green = 65535;
> colors[1].blue = 0;
> gdk_colormap_alloc_colors(gdk_colormap_get_system(),
> colors,
> 2,
> FALSE,
> TRUE,
> &succeeded);
> g_return_val_if_fail(succeeded, 1);
>
> widget = gtk_button_new_with_label("hello");
> tooltips = gtk_tooltips_new();
> gtk_tooltips_set_colors(tooltips, colors + 0, colors + 1);
> gtk_tooltips_set_tip(tooltips, widget, "what?", "huh?");
>
> gtk_widget_show(widget);
>
> window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> gtk_container_add(GTK_CONTAINER(window), widget);
> gtk_widget_show(window);
>
> gtk_main();
>
> return 0;
> }
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
/dev/null
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]