我有一个Gtk::TreeView
里面的Gtk::ScrolledWindow
。有一次,我Gtk::TreeRow
排了。我如何知道该行是否在可见区域中以及如何滚动 ScrolledWindow 以使该行可见?
LE:我找到了解决方案:
Glib::RefPtr<Gtk::TreeModel> model = pSEMQueueTreeView->get_model();
Gtk::TreeModel::Children children = model->children();
Gtk::TreeModel::Children::iterator it;
it = children.begin();
pSEMQueueTreeView->scroll_to_row(model->get_path(it));