GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Aug 25, 2016 6:26 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: treeview editable cells flexibility
PostPosted: Fri Oct 26, 2012 1:47 am 

Joined: Fri Oct 26, 2012 1:39 am
Posts: 1
I am considering using GTK+ in an upcoming project. Before I dive in, I wanted to be sure that the toolkit is able to satisfy all of the requirements of the project. One of the requirements is that a the user sees a tree table such that each cell in one of the columns displays an icon that the user clicks to iterate over several states, each one represented by a different image.

It is also required that changes to the cell state effect the states of cells in the same column in rows that are descendents in the tree representation.

It would seem that this behavior is possible using the editable columns feature of the TreeView widget, but I wanted affirmation from someone in the know before I proceed.

If this behavior is indeed possible, it would very useful if someone could point me to a code snippet.


 Post subject: Re: treeview editable cells flexibility
PostPosted: Sun Nov 18, 2012 10:29 pm 
Familiar Face

Joined: Mon Jul 11, 2011 10:24 am
Posts: 15

images in treeview cells are not activatable by default. It can be done, but one has to do some effort for it, like a custom cellrenderer class derived from CellRendererPixbuf.
There are examples for it on the web, like ... ns-on-rows
or ... llrenderer
for Python, I've seen an example in C before, but can't find it in the moment.
For a solution without an image, a GtkCellRendererSpin would be much easier, but if has to be an activatable image, I don't know of another solution than the ones suggested.

Regarding effecting the states of cells in descendents that shouldn't be a problem.


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

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 2 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