Re: Tooltip in CList



On Fri, 10 Aug 2001, David Robin wrote:

> Hi everybody,
> 
> I'd like to see a tooltip appear next to the mouse cursor when I make a selection in a CList. This tooltip would print something like "# rows selected" over the selected rows.
> 
> Here is a (little) part of my code:
> 
>     gtk_container_add( GTK_CONTAINER (scrolled_window), clist );
>     gtk_container_add( GTK_CONTAINER (eventbox), scrolled_window );
> 
>     tooltips = gtk_tooltips_new();
>     if(selected_posts>1)
>     {
>         sprintf(text, "%i row selected", nb_selected_posts );
>         gtk_tooltips_set_tip( tooltips, eventbox, text, (gchar*) NULL );
>         gtk_tooltips_enable( tooltips );
>     }
> 
> 
> And here the problems:
> 1. I have to move out from the eventbox (same geometry as CList) and then to move in again to make the tooltip appear.
> 2. the tooltip appear at the border of the eventbox, i.e. out of the Clist, and not over the selection has I wanted it to be.
> 
> Has someone an idea on how to fix those drawbacks?

gtk doesn't currently allow for this kind of tooltip setups
(and won't in 2.0 either). currently you can just setup
static tooltips per-widget.
a revamp of the tooltip implementation is planned post-2.0.

> 
> Thanks,
> 
> 
> David.
> 

---
ciaoTJ





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