Re: [gtk-list] gtk_tooltips_set_tips
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- cc: Trog <trog gtk org>
- Subject: Re: [gtk-list] gtk_tooltips_set_tips
- Date: Sat, 23 May 1998 17:02:04 +0200 (CEST)
On Fri, 22 May 1998, Al Wold wrote:
> I am just learning GTK, and am having trouble getting tooltips to work.
> In the tutorial, it mentions a function called gtk_tooltips_set_tips,
> which takes a GtkWidget, a GtkTooltips and a char pointer as arguments,
> and assigns the tooltips to the widget. When trying to use this, I get an
> implicit declaration error and undefined reference when linking. I have
> looking in the gtktooltips.h header and it has a gtk_tooltips_set_tip
> function, which also takes an extra char pointer which is tip_private. I
> have tried calling this function using random text strings, which caused
> segmentation faults. I am using GTK 1.0.2...anyone know what might be
> wrong?
you can use gtk_tooltips_set_tip() just like the old gtk_tooltips_set_tips()
by specifiying NULL for `tip_private'.
if you get segfaults with invokation of this function, you probably have
specified invalid GtkWidget* or GtkTooltips* pointers.
something like this should work
GtkTooltips *tips;
GtkButton *close_button;
close_button = gtk_button_new_with_label ("Close");
tips = gtk_tooltips_new ();
gtk_tooltips_set_tip (tips, close_button,
"Use this button to close the window",
NULL);
[Trog: can you care for updating the tutorial/faq in respect to
gtk_tooltips_set_tip(), please?]
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]