how get scroll_to_row working
- From: kiet tran <vietory2g gmail com>
- To: gtkmm-list gnome org, Kjell Ahlstedt <kjell ahlstedt bredband net>
- Subject: how get scroll_to_row working
- Date: Thu, 9 Feb 2012 16:11:42 -0800
Hi everyone,
i been trying to use scroll_to_path from a treeview and it seems to do nothing
Gtk::TreeModel::Row *function_append()
{
Gtk::TreeModel::Row row = *m_refTreeModel->append();
row[m_Columns.m_col_text] = order_text;
row[m_Columns.sort] = new_order->_get_no_of_packs();
row[m_Columns.active_bg_color] = color;
row[m_Columns.normal_bg_color] = "white";
Gtk::TreeModel::Row * return_row = &row;
return return_row;
}
void some_function()
{
Gtk::TreeModel::Row * row = function_append();
scroll_to_row(*row);
}
void scroll_to_row( &row)
{
Gtk::TreeModel::Path path = m_refTreeModel->get_path(row);
m_tree_view->scroll_to_row(path);
}
Just wondering how my path is poting to NULL in scroll_to_row function and if possible if someone show me how to make this work thanks.
What I am trying to do is having the scrollwindow to always go to the bottom of the page when insert a new row.
P.S I didnt mean to sent the last email
Cheers,
Kiet Tran
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]