[grapefruit] Can't fit tooltips into grapefruit "box" model
Roman Cheplyaka
roma at ro-che.info
Mon May 11 11:06:22 EDT 2009
I'm trying to make a label which can show a tooltip (it probably has to
be placed into eventbox, but that's irrelevant here).
I tried to make a box for this, which will take an inner item, a text
signal and display that item with tooltip.
Here's how tooltips are done in gtk2hs:
http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-Misc-Tooltips.html#v%3AtooltipsSetTip
In particular,
tooltipsSetTip
:: (TooltipsClass self, WidgetClass widget)
=> self
-> widget widget
-> String tipText
-> String tipPrivate
-> IO ()
As you can see, every time we want to change the tooltip we need to
access _both_ widget (inner object) and tooltip (outer object) which
can't be done (if I understand correctly) in widgetBox after inner item
is placed.
So, is the single solution to make my own datatype which contains both
tooltip and label and declare it a widget?
--
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain
More information about the Grapefruit
mailing list