views:

22

answers:

2

I'm displaying some data as a TreeView. How can I detect a click on a particular tree-view cell, so that I know which column of which row was clicked on?

This is what I want to do, so maybe there's a better way: Part of the data is a series of True/False values indicating a particular set of options. For example, the options might be picking any of the options "Small, Medium, Large, X-Large" to be display. If the user selects "Small" and "Large", then the cell should display "Small, Large". I don't want to give each a separate column since there are actually like 20 options, and only 2 or 3 will be selected at any point.

When the user clicks on the cell, I want to display a pop-up with a bunch of checkboxes. The user can then select what s/he wants and submit the changes, at which point the cell's value should be updated.

The easiest way I thought of doing this would be to just detect a click (or a double-click) on the cell. Then I could pop up the window, and have the submit button of the window do what I want.

A: 

Ah from this grea tutorial and the API docs, I can just connect to the row-activated event, which will give me all the information I need.

Claudiu
+1  A: 

The row-activated signal is sent when a GTK TreeView row is double-clicked.

syrion