gtk combo box issues

Hi all,

I am trying to build a combo box's content on the fly but I'm missing something & I don't know what it is. Would someone please help me? I am able to add a Row to the Combo Box. I am able to set the value of that row. But the value does NOT APPEAR when I click the combo box down arrow button. Just a BLANK ROW appears. Here is the code that I'm using:

In the HEADER:

class CFireButtonMortarTrajModelColumns : public Gtk::TreeModel::ColumnRecord
        //add(m_colRowNumber);                     // position 0
      }; ///< ctor
            ~CFireButtonMortarTrajModelColumns() {;}; ///< dtor
          Gtk::TreeModelColumn<int>  m_colRowNumber; ///< Row Number
          Gtk::TreeModelColumn<int>  m_colFireButtonToMortarTrajLineName;
  }; // class CFireButtonMortarTrajModelColumns

Gtk::ComboBox    *m_comboboxFireMortar1TrajName;
CFireButtonMortarTrajModelColumns  m_cFireButtonMortarTrajModelColumns;
Glib::RefPtr<Gtk::ListStore> m_glsFireButton1MortarTrajConnectionComboBoxList;

IN the CPP:

m_refGlade->get_widget("combobox_fireMortar1TrajName", m_comboboxFireMortar1TrajName); m_glsFireButton1MortarTrajConnectionComboBoxList = Gtk::ListStore::create( m_cFireButtonMortarTrajModelColumns ); m_comboboxFireMortar1TrajName->set_model(m_glsFireButton1MortarTrajConnectionComboBoxList); m_glsFireButton1MortarTrajConnectionComboBoxList->append()->set_value(m_cFireButtonMortarTrajModelColumns.m_colFireButtonToMortarTrajLineName, p_iTrajectoryLineNumberToAdd);

This code produces a BLANK ROW in my combo box. What am I not doing that is preventing me from seeing the value displayed?

Thanks everyone.  I really appreciate your help.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]