Get list item value from a List

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get list item value from a List

aecio
This post has NOT been accepted by the mailing list yet.
Hi,

I'm working with a qx.ui.form.List who contains a number of qx.ui.form.ListItems. My question is How can I get a listitem value for that List???

Thanks!!!
Reply | Threaded
Open this post in threaded view
|

Re: Get list item value from a List

rsantiagopaz
if every listitem has a model property, with
list.getChildren()[0].getModel()
you get the "value" from the first listitem.

And with
list.getModelSelection().getItem(0)
or
list.getSelection()[0].getModel()
you get the "value" from the first selected listitem.