1

I have treeview with two columns: ID and Value. each row represent parameter like strenght, hp... and there can be subcategory like attack type, in attack type sub tree i can add few attack like fire or ice attack (it is stored in two dimension tab) and i need to put button: add attack type, remove attack type in to tree.

How to do that?

1 Answers1

-1

The GTK TreeView widget is used to display data in lists and hierarchical trees. Each row in the tree or list can contain multiple columns. The TreeView API can be a little overwhelming, so we've provided the NodeView convenience APIs in Gtk# to help simplify its use. enter link description here

Pradip
  • 31
  • 1
  • 11
  • The main problem is to create one diferent row from others. For example, i have 10 rows with text field and i want have one row with button (or checkbox), and after that next few rows with text fields. The best way to make that is using gtk NodeView? –  Sep 10 '13 at 11:58
  • If you want to have a column that shows a text field or a checkbox you have to pack a cell renderer for a text field and a checkbox inside the column and use Gtk.TreeCellDataFunc to determine which one of them to show. I did an exmaple to use a TreeCellDataFunction in C [here](http://stackoverflow.com/questions/14006658/changing-font-color-on-a-column-in-treeview-gtk/14010257#14010257) – GTK 1.2.6 fanboy Sep 11 '13 at 10:16
  • If you want to see it in use look [here](http://stackoverflow.com/questions/14761389/setting-a-single-row-of-a-cellrenderertoggle-to-inconsistent/14762588#14762588) – GTK 1.2.6 fanboy Sep 11 '13 at 10:33