GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 24, 2016 4:12 pm

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Add tooltips to items in a treeview?
PostPosted: Thu Jan 15, 2009 7:46 pm 

Joined: Thu Jan 15, 2009 7:39 pm
Posts: 1
Anyone know how to add pop-up tooltips to individual 'fields' in a treeview? Note: My treeview displays a list store, not a tree store ...rows and columns of information.

I would like to have a content-specific tooltip type window pop up if the mouse hovers over an item for a short time, not just a generic tooltip.

The second best answer would be a more generic type tooltip, but different for each column in a treeview.

The third best answer would be a generic type tooltip that pops up when hovering anywhere within a treeview.



 Post subject:
PostPosted: Fri Jan 16, 2009 11:19 pm 
GTK+ Geek

Joined: Wed Dec 19, 2007 9:15 pm
Posts: 61
Location: Glasgow, Scotland
The way to get a tooltip on a whole row of a GtkTreeView is as follows.

First, you need to create a new column in the ListStore with the text for the tooltips (G_TYPE_STRING). You then set the tooltip_column property of the TreeView to the column number (usually from a enum), using gtk_tree_view_set_tooltip_column.

If you want tooltips on specific cells, you have to do something more complex, but I don't know what it is.

Jabber – bcowan [at]

 Post subject:
PostPosted: Sat Jan 17, 2009 12:15 pm 
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
@tananaBrian: Hello and welcome to the Gtk+ forums.

GtkTooltip documentation is quite informative about the different ways of playing with tooltips. You can read it here:

GtkTreeView offers some convenience function to work with tooltips. They ar all described in GtkTreeView's API documentation at (the last 5 functions in synopsis part are related to tooltips).

A sample of usage can be seen in one of the evolutions file:

Hope you'll find some useful pointers in upper material.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot] and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group