trouble with TreeView/ListStore



Good day all,

I try to use TreeView/ListStore and I have some trouble. I've a list I
want to display on a TreeView Widget. An information is a boolean and
TreeView display it with a CheckBox(it's good). But this Column is
editable and I want to do some stuff when the CheckBox is toggled.
I look where I can and I found the CellRenderToggle::signal_Toggled, so
I test. But I cannot compile my code, can you tell me what is wrong?

listTable::listTable()
{
    ...
    Gtk::CellRendererToggle *CRT =
    dynamic_cast<Gtk::CellRendererToggle*>(treeView_.get_column_cell_renderer(0));
    CRT->signal_toggled().connect(sigc::mem_fun(*this,&listTable::on_toggled));
    ...
}

With this, g++ tell me some errors on sigc file,(I don't understand what
he say). I just now the first line works and second not.

And I dont really know if with this signal, I can know which row has been
modified(maybe this Selection?).

Are some arguments implicitely given on "target" member of a signal?

Other question, Can I modify the color background of some row on
TreeView?

-- 
Nicolas Haller



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