Re: GtkListItem Tooltip



Miraclesoa Miraclesoa wrote:

I need to show a tooltip for a gtklistitem of gtklist (in a
gtkcombobox).  Every time that the mouse stays on this gtklistitem. 
Is this possible? If yes, how can I make this possible?

There's at least no easy way for that. Likely you know that it's simple
to add a tooltip to a GtkCombo as a whole. I understand that you want to
provide more specific tooltips, possibly different ones for every list
item of a GtkCombo.

Assignment of GtkTooltips is limited to widgets which have their own
associated X window / GdkWindow. I believe GtkListItems have not.
Perhaps you could wrap each of your GtkListItems with a GtkEventBox to
provide it a GdkWindow but that would be ugly and a waste of system
resources.

A more promising approach could be to assign a GtkTooltip to your
GtkCombo (or GtkList), catch its "show-help" signal, in the handler
determine which GtkListItem is currently hilighted by the mouse cursor
and change the tooltip text for the entire GtkList accordingly on the
fly. However, I don't know whether this approach is really feasible.



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