Gtk2::Tooltips and Gtk2::TextTag?



Hi all,

I'm building a very simple WYSIWYG editor, and part of that is the
addition and display of 'links' in a textview. I'd like to be able to
get a little tooltip to popup when the cursor is left over a link
(I've already got the cursor change going which was pretty simple
except for the '$txt->window->get_pointer' gotcha to keep
motion-notify firing), but I can't seem to find a way to do it.

Obviously I can't attach the tooltip to a texttag (or vice versa),
since texttags aren't widgets. So I tried setting the tooltip text for
the textview instead (thinking that if you hover over a link, you're
technically hovering over the view, which _can_ be attached to a
tooltip, I think...) but nothing happens - the cursor changes, but no
tooltip. I'm guessing it has something to do with the pointer already
being over the textview when the tooltip is attached to it, so maybe a
signal never gets fired to tell the tooltip to popup?

I've done a few google searches, and found a couple of 'fixes' in
python for this, but they involved essentially creating a 'fake'
tooltip popup (including the 'recipe' for programatically opening a
tooltip at http://live.gnome.org/GTK2-Perl/Recipes#How_can_I_programmatically_popup_a_tooltip_.3F).

Is that really the only solution, or is there some way to make popups
work in this case?

MB



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