[Gtk-sharp-list] [Mono GTK#] Bind Object List to ComboBox
jaymarvels
jacob.spencer80 at googlemail.com
Tue Sep 17 21:51:26 UTC 2013
Thanks..
The loop works great..
You said that if I wanted to get the active item value do this:
TreeIter iter;
if(combo.GetActiveIter(out iter))
positionMask = (int) combo.Model.GetValue(iter,1);
This doesn't work..
i had to amend it to:
TreeIter iter;
if(combo.GetActiveIter(out iter))
int positionMask = (int) combo.Model.GetValue(iter,1);
As i needed to declare positionMask type..
But then it errors:
"An embedded statement may not be a declaration or labeled statement"
On 17 September 2013 20:17, Andrey Gankov [via Mono] <
ml-node+s1490590n4660902h72 at n4.nabble.com> wrote:
> 17.09.2013 21:29, Jay Spencer пишет:
>
> >
> > That should work quite well...especially as the list is short...
> >
> > Further in my project I deserialize a xml file into a list object
> > class and will need to populate a combobox as well...again no problem
> > with winforms...
> >
> > Could I do a foreach loop and populate the list store like that...
> >
> > So from the class into the listview via a foreach loop ?
> >
> Yes, You need use loop for populate ListStore.
>
> --
> Andrey Gankov
> Mail:[hidden email] <http://user/SendEmail.jtp?type=node&node=4660902&i=0>
> ICQ: 230-684-976
> Jabber:[hidden email]<http://user/SendEmail.jtp?type=node&node=4660902&i=1>
>
> _______________________________________________
> Gtk-sharp-list maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=4660902&i=2>
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://mono.1490590.n4.nabble.com/Mono-GTK-Bind-Object-List-to-ComboBox-tp4660899p4660902.html
> To unsubscribe from [Mono GTK#] Bind Object List to ComboBox, click here<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4660899&code=amFjb2Iuc3BlbmNlcjgwQGdvb2dsZW1haWwuY29tfDQ2NjA4OTl8OTg5MTAwMjg=>
> .
> NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-GTK-Bind-Object-List-to-ComboBox-tp4660899p4660905.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20130917/038a4441/attachment.html>
More information about the Gtk-sharp-list
mailing list