Hi all,

I need to set a item in ComboBox, How i do that ?

In Web i just make this:
myCombo.SelectedValue = "2" , automatically myCombo show me "Description
of Option #2"
sorry i'm novice in GTK# client applications


my code:

CellRendererText descricao = new CellRendererText ();
CellRendererText id          = new CellRendererText ();

comboBoxStore = new ListStore (typeof (string), typeof (string));
cbFiltro.Model = comboBoxStore;

cbFiltro.PackStart (descricao, false);

cbFiltro.AddAttribute (descricao, "text"  , 0);

comboBoxStore.AppendValues("Option #1", "1");
comboBoxStore.AppendValues("Option #2", "2");
comboBoxStore.AppendValues("Option #3", "3");

...
...

string mySelection = "2";

???


How to set the row of ListStore or ComboBox using a value into variable
"mySelection" ?


Magalhaes

/* Sorry my english */
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to