@clement wrote:
i am creating a
Eto.Forms.ListBox
which uses aDataStore
for its list items as shown here. However my list is not a list of strings but a list of class instances. The class name is “Fruit”. The listboxDataStore
seems to accept my list but each list item is displayed in the listbox like this:
<__main__.Fruit instance at 0x0000000000000085>
Each class instance has a property “Name”. How do i tell Eto to use “Name” as
Eto.Forms.ListItem.Text
?In Windows forms this is done like this:
self._listBox1.DataSource = MyListOfFruit self._listBox1.DisplayMember = "Name"
_
c.
Posts: 1
Participants: 1