Re: Refreshing a Treeview within a modeless dialog window: How?
- From: allen777 <Allen Saucier itt com>
- To: gtkmm-list gnome org
- Subject: Re: Refreshing a Treeview within a modeless dialog window: How?
- Date: Wed, 11 Mar 2009 13:49:47 -0700 (PDT)
Note:
This code does not matter whether my treeview is in my main window or my
dialog window. Either way, the treeview does NOT update when I modify
values w/in a row - any row - of the treeview.
allen777 wrote:
>
> Hi all. I'm struggling with gtkmm treeview refreshing on linux (CentOS
> 4).
>
> Would someone be so kind as to tell me how to refresh a treeview in a
> dialog window that is popped up w/ the show() command?
> here is my code that is called every few seconds but the "update" only
> appears AFTER I move my mouse. This is driving me
> crazy.
>
> What I've commented out doesn't do the trick.
>
> Thanks so much! I really appreciate your help.
>
> void CEntitiesDisplayControls::m_vUpdateAirEntity(std::string &p_sName,
> double p_dPosX, double p_dPosY, double p_dPosZ, double p_dDistance)
> {
> //1st: search all rows for this entity name
> std::string s3;
> Gtk::TreeModel::Children allRows = m_trstTreeviewModel->children();
> Gtk::TreeModel::Children::iterator itrAllRows = allRows.begin();
> for(; itrAllRows!=allRows.end(); ++itrAllRows)
> {
> Gtk::TreeModel::Row row = *itrAllRows;
> Gtk::TreeModel::Children allSubRows= row.children();
> for (Gtk::TreeModel::Children::iterator itrSubRow=allSubRows.begin();
> itrSubRow != allSubRows.end(); ++itrSubRow)
> {
> Gtk::TreeModel::Row subRow = *itrSubRow;
> if ( (s3=subRow[m_cModelColumns.m_colName]) == p_sName)
> {
> subRow[m_cModelColumns.m_colPosX] =
> CUtilityFuncs::m_strDoubleToString(p_dPosX,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> subRow[m_cModelColumns.m_colPosY] =
> CUtilityFuncs::m_strDoubleToString(p_dPosY,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> subRow[m_cModelColumns.m_colPosZ] =
> CUtilityFuncs::m_strDoubleToString(p_dPosZ,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> // subRow->set_value(m_cModelColumns.m_colPosX,
> CUtilityFuncs::m_strDoubleToString(p_dPosX,
> CUtilityFuncs::g_iFIXED_NOTATION, 3));
> // Gtk::TreeModel::Path p=m_trstTreeviewModel->get_path(itrSubRow);
> // m_trstTreeviewModel->row_changed(p, itrSubRow);
> // m_vUpdateGUI();
> }// if found matching air entity name
> } // for itrRowChildren
> } // for itr
> } // m_vUpdateAirEntity
>
>
--
View this message in context: http://www.nabble.com/Refreshing-a-Treeview-within-a-modeless-dialog-window%3A--How--tp22459430p22464206.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]