TreeView Questions



Hi.  I have recently begun porting one of my programs to GTK2 and have decided to use the TreeView instead of 
the CList.  Now it is much more difficult to learn how to properly use the TreeView than a CList and I have a 
few things I cannot figure out.

1st
How does one change the color for the font of just a single row.  I could use gtk_clist_set_foreground before 
but now I am at a loss to figure it out.

2nd
I need to catch double click signals from the user input on the treeview.  I do this using a button press 
event, I check for the double click by checking the event type.  This works fine however because I catch the 
button press signal, the row that the user clicks on is never selected (even on a sigle click).  I would like 
for it to be selected however.  I was thinking the function gtk_selection_select_path could be used b/c I 
have a path to the row however, what would/where would/how would I get the GtkTreeSelection that the function 
requires.

If you would be so kind, please provide short (snippets) of code function calls etc. . . that I would use and 
explain what is going on (most important!).  I have been trying to understand the TreeView as a whole by 
looking at the API however that has not helped me much to really understand it.


Thank you.
David Swiston



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