Using Trees



Hi,

I was trying to append allow a user to click a button that would allow an additional column to be appended to my tree.

This is what I have:

void treetstruct::add_column()
{
    Gtk::TreeModelColumn<unsigned> newcol = columns.addcol();

    treeview.append_column_editable("New", columns.cols.back());
}

        Gtk::TreeModelColumn<unsigned> addcol()
        {
               Gtk::TreeModelColumn<unsigned> newcol;
               cols.push_back(newcol);
               add(cols.back());

               return cols.back();
        }

The column will appear; however, when I attempt to change values, they are automatically erased, and there are many errors that appear in the command line. If anyone could help, even by providing additional information on trees in general, I would really appreciate it.

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