Accessing combo box text




Hi All,

I am using Glade 3.0 and GTKMM. I am trying to access Combo box text and id. I am failing in it. I pasted a code I did. Please help in accessing Combo box attributes.

//This is the signal

if(m_Combo1)
{
m_Combo1->signal_changed().connect( sigc::mem_fun(*this, &mainWindow::combo_product_changed));
}

//Trying to access ID

void mainWindow::combo_product_changed()
{
  int product = m_Combo1->get_active_row_number();
  std::cout << "Row = " << product << std::endl;
}

Thanks
Deepak




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