You are not logged in.

#1 2012-02-14 13:22:26

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

Glade and C++

Ok, so I am trying to throw together a quick program using Glade and C++. I have however, run into an issue. I have managed to populate a combo box through glade, using a liststore and then have it populate the combo box with the Column i made called Text. Now I have also created a column called Value and entered with it the corresponding values which match thier human readable format.

My question, how do I access this value depending on what is selected in the combo box. Or indeed, how do I access the liststore full stop?

Best Regards,
Jack.

Offline

#2 2012-02-14 14:40:04

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

Re: Glade and C++

Ok so this is a snippet I have so far which shows what I am trying to achieve.

Gtk::TreeModelColumn<guint> hdmiModeColValue;
Gtk::ComboBox hdmiModeValue;

Gtk::TreeModel::iterator iter = hdmiModeValue->get_active();

  if (iter) {

    Gtk::TreeModel::Row row = *iter;

    if (row) {

      // Get column 'Value' here

    }

  }

Last edited by jack.mitchell (2012-02-14 14:40:28)

Offline

Board footer

Powered by FluxBB