Multiple Renderers In A Tree View Column

I’m trying to create a tree view that lets the user edit items in one of the columns.  Items are either simple strings or picked from a list of strings.  To do this, I packed a text renderer and a combo box renderer into that column.  In the model, I added two Glib::Boolean columns, one to control the “visible” attribute of each of these renderers.  If the row is of string type, only the text renderer will be visible, etc.


The problem is in the combo box renderer, which should show a different list of items for each row.  How do I tell the renderer which model to use for its list for a given row?  I tried adding another column to the tree view’s model, of type Glib::Scalar, and set to the right model for combo box rows, and to undef for text renderer rows, but I can’t seem to get any items to show up in the combo boxes.


Thanks for the help, and for those who maintain this useful API.



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