[gtkmm] Tooltips on Toolbuttons



Hi,

Firstly, here's what I've tried and found doesn't work: in my class
("GToolbar"), I have a member "Gtk::Tooltips tooltips_".  For each
ToolButton created and added, I do "tooltips_.set_tip(*toolbutton, tip,
tip);".  This compiles and runs without errors or warnings, but no
tooltips are displayed.  I've tried calling tooltips_.enable().

In the tutorial at [1] the stuff about setting tooltips is commented out
with a note about some GTK+ bug.  In the message at [2] two solutions
are proposed: (a) to use the GTK+ gobj() to retrieve a pointer to the
ToolTips object belonging to the ToolBar, or (b) to create a new
ToolTips for each ToolButton.

a. is not working for me: I get a compiler error:
"""
GToolbar.C:252: error: invalid use of undefined type `struct
_GtkToolbar'
/usr/include/gtkmm-2.4/gtkmm/toolbar.h:36: error: forward declaration of
`struct _GtkToolbar'
"""

Does this indicate that I need to include the GTK+ headers?  In any
event, this method seems inelegant.

b. Seems to completely undermine the point of having ToolTips: one
cannot move the mouse across the toolbar and have the tips come up
undelayed after waiting for the first tip.

Has any progress been made on this?

John Spray
(jcs116 york ac uk)

1. http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch10s04.html
2. http://mail.gnome.org/archives/gtkmm-list/2004-April/msg00054.html




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