[Vala] Some basic question about TreeView widget



Hi.

I have created a TreeView with 3 columns and one of them is a "Toggle" type,
using this code:

lst_common_soft = builder.get_object ("lst_common_soft") as TreeView;
lstmodel_common_soft = new ListStore (3, typeof (string), typeof (string),
typeof (bool));
lst_common_soft.set_model (lstmodel_common_soft);
CellRendererToggle cell_toggle = new CellRendererToggle();
cell_toggle.toggled += on_entry_toggled;
lst_common_soft.insert_column_with_attributes (-1, "Program name", new
CellRendererText (), "text", 0, null);
lst_common_soft.insert_column_with_attributes (-1, "Description", new
CellRendererText (), "text", 1, null);
var column = new TreeViewColumn ();
column.pack_start (cell_toggle, false);
column.add_attribute (cell_toggle, "active", Columns.INSTALL);
column.set_title("Install?");
lst_common_soft.append_column(column);

Is there a simple attribute that I can pass with "column.add_attribute...."
so all the lines I add to my table will not be in "checked" state by
default?

And even better question, where can I find the list of all the attributes
that I can pass to a TreeViewColumn () ?

Thanks.


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