[IronPython] adding items to a listview (what am I doing wrong)
LHaynes at Gemcomsoftware.com
Tue Dec 14 01:52:14 CET 2010
This looks like winforms, which I haven't used in ages, but I'm guessing that it's because you're changing the item inside the ListView's items collection, but the ListView doesn't know that the items collection has changed. You can probably set the ListView Items property to null and then back to your collection, which will result in it updating. (This isn't really an IronPython question - you'd probably be better off asking this UI stuff in a more appropriate forum).
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of robinsiebler
Sent: Tuesday, 14 December 2010 8:43 AM
To: users at lists.ironpython.com
Subject: Re: [IronPython] adding items to a listview (what am I doing wrong)
> I am trying to add items to a list view. Just to make sure it works, I
> 1 item when the control is created. However, when I try to add an item
> at run-time (using the same code), the item is not added to the control:
> item2 = ListViewItem()
> item2.Text = self.currGameName
> What am I doing wrong?
> http://old.nabble.com/file/p30399194/MainForm.py MainForm.py
I can't tell if the item is not being added or is just not visible. I tried
using EnsureVisible, but it didn't help.
View this message in context: http://old.nabble.com/adding-items-to-a-listview-%28what-am-I-doing-wrong%29-tp30399194p30450878.html
Sent from the IronPython mailing list archive at Nabble.com.
Users mailing list
Users at lists.ironpython.com
More information about the Ironpython-users