Hello. I have managed to fix my problem.

I was adding data to my list like that:
        lstmodel_common_soft.set (iter, 0, "1", 1,"2", 2, "3",-1);
        lstmodel_common_soft.append (out iter);
so I changed it to:
        lstmodel_common_soft.set (iter, 0, "1", 1,"2", 2, 0,-1);
        lstmodel_common_soft.append (out iter);
And now the check-boxes are in unchecked state... (my mistake...)

Also, I found a very good list of all the properties and attributes that
could be set to cells in
a TreeView widget:
http://www.pygtk.org/pygtk2tutorial/sec-CellRenderers.html
Maybe it will help some body in the future...

On Thu, Sep 10, 2009 at 6:06 PM, Arkadi Viner <[email protected]> wrote:

> 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.
>
>
>
>
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to