Hello, I'm not an expert on gtkmm, but I'll try to take a stab at this one.
>From what I understand of TreeView is that the TreeView is the display and the >TreeModel is the data that can be displayed by a TreeView. That being said, TreeView uses a class called CellRenderer[1] to display the view... So what you're attempting to do is add something that is not a CellRenderer to the TreeView display, which, I believe, cannot be done. You see, the TreeModel contains specific types of data (i.e. ustrings, integers, booleans, and doubles) and the TreeView has a way of displaying those types of data using CellRenderers. By default, if you use a column that is a ustring, it will choose a CellRenderText as the CellRenderer, unless you tell it to use a different CellRenderer. Does that make any sense at all? -Aaron Geier [1]http://www.gtkmm.org/docs/gtkmm2.4/docs/reference/html/classGtk_1_1CellRenderer.html -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of José Alburquerque Sent: Wednesday, September 05, 2007 4:56 PM To: [email protected] Subject: Displaying a "hierarchy" of classes in a TreeView Hi everyone. I'm new to gtkmm though I think I understand the basics of gtkmm from the "Programming with gtkmm" tutorial. However, I'm really stumped at implementing a TreeView. As I understand it it needs a TreeModel both of which ListStore and TreeStore are. For the project I'm developing I believe I'd need something like a TreeStore for the model because the rows in the intended TreeView will have children. Here's my question: I've developed a series of "hierarchical" classes (not in the sense of inheritance, but in the sense of one being a child of another, etc.) and the hierarchy can be somewhat intricate and moderately deep. What I'm trying to do is display the hierarchy in a TreeView (by class name or a description of the class), but it's difficult for me to wrap my mind around what I need to do. I notice that the TreeStore::create() method requires TreeModel::ColumnRecord, but what's confusing me is that my classes are not string classes so I don't know how I could represent them using the ColumnRecord. Might any of you illuminate me a little as to how I might go about displaying my hierarchy of classes in a TreeView? I'd really appreciate it. Thanks. -Jose _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
