how get scroll_to_row working



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]