RE: gtktreeview with expanded row



I want to add special row for every user with description.
so it will look like that

-^group1
   user1
     desc1
   user2
     desc2

but I want the rows with descriptions to be always expanded 
when I expand
groups and with arrows unvisible in the rows with users names.
also I want them to be unselectable.


There are two ways to approach this.  

The first is to not have another row for the description and make the
description part of the user row (just CR it to make it appear on the line
below).  

The second is to just make is a child of the "user" row and simply catch the
"row-expanded" or "row-collapsed" signal for the GtkTreeView for the parent
(the user row) and automatically expand the description row.  The problem
is, I dont think there is a way to hide the expander arrow - atleast not
easily with the current API.

To make a row unselectable you might have to intercept the appropriate
signal for the GtkTreeModel when items are selected.  You should be able to
do this and return TRUE or FALSE based on if you want the row to be
selectable.

Regards,
Martyn



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