Other projects
Get the selected widget in a list |
2009-02-11 17:13 |
| Submit by Tofu | |
Kuix manage Lists as a normal tree of widgets. In this case there no special way to know which item index of a list is selected. But you can retrieve the focused widget (which is the selected one). And if you build you list from a DataProvider, each ListItem has a reference to it corresponding data source, then you would be able to know the selected element in your model. For the next example we suposed that our list is filled by a dataprovider the respond to the contacts property and deliver a set of Dataprovider that responds to the name property. XML file :
Java file : (a class that represent the current frame)
Java file : (the Contact dataProvider)
|
| Tags: list selected | Popularity: 1067 | |

