Re: Tooltips for Gtk::TreeView rows



Hello!

I changed the function from

  Gtk::TreeView::get_path_at_pos()

to

  Gtk::TreeView::get_dest_row_at_pos()

This function seems to work as expected and returns the right path.
Nevertheless, the behaviour of get_path_at_pos() is not intuitive and in
my opinion it's a bug. The get_dest_row_at_pos() is intended for drag
and drop, it's only a "workaround" to use it.

Regards,
Simon

Simon Fuhrmann wrote:
> Hello!
> 
> I want to have tooltips for rows in a Gtk::TreeView. I activated the
> tooltips (w.set_has_tooltip(true);) and connected signal_query_tooltip,
> as the documentation told me. Now I have to map the x and y coordinates
> to a path, I do this with w.get_path_at_pos(...).
> 
> The problem is now that get_path_at_pos(...) only works if I disable the
> column headers. Otherwise get_path_at_pos(...) returns the path for the
> next row (actually it depends on the height of the header). First, I
> googled and I found some posts about that issue. Some suggested
> disabling the sorting feature, which did not work for me. Disabling the
> headers for a short time in the callback didn't work but lead to strong
> artefacts. I need to find out the height of the header somehow, how can
> I do this, or is there any other way to map the coordinates to the
> correct path?
> 
> Thanks,
> Simon Fuhrmann
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



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