How to select a particular child in TreeModel row?

I want to select a particular child of a particular row in TreeView.

We can select a particular row of the TreeView using this code

    std::cout<<"selected Index: "<<selectedIndex<<std::endl; 

    Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = imgTreeView->get_selection();

    Gtk::TreeModel::Row rs = imgTreeViewPointer->children()[selectedIndex];

    if (rs)
    {
        refTreeSelection->select(rs);
    }
    Glib::RefPtr<Gtk::TreeModel> model = imgTreeView->get_model();
    Gtk::TreeModel::Children children = model->children();
    Gtk::TreeModel::Children::iterator itn_start,itn_end;

    itn_start = children.begin();
    itn_end = children.end();

    imgTreeView->scroll_to_row(model->get_path(itn_start));
    imgTreeView->scroll_to_row(model->get_path(itn_end));

How I select one of the children’s in one of the row of the TreeView?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.