Re: Adding Tooltips in a TreeView



On Mon, 2008-08-04 at 17:34 -0500, John Hobbs wrote:
> Hello,
> 
> I'm trying to set tooltips by row in a tree view, but I'm a tad stuck.
> 
> Looking at the documentation I see I need a Gtk::TreeModel::Path,
> which I am currently getting from a Gtk::TreeModel::iterator, which I
> get in turn from calling append() on a Gtk::ListStore :-)

You can get a TreeModel::Path from a TreeModel::iterator by using the
Path(iterator) constructor.

> What I also apparently need is a RefPtr to a Gtk::ToolTip, here is the
> call from the documentation [1].
> 
> void Gtk::TreeView::set_tooltip_row ( const Glib::RefPtr<Tooltip>&
> tooltip, const TreePath& path );

I am also not sure how this should be used.

I think it will be easier to just add a text column in the model for the
tooltip text, and then use set_tooltip_column().

> My question is, where do I get a RefPtr to a Gtk::Tooltip? There isn't
> a static "create()" method in Gtk::Tooltip like I am accustomed to.
> Anyone see what am I missing here?
> 
> Thanks for your help in advance :-)

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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