[IronPython] adding items to a listview (what am I doing wrong)

robinsiebler robinsiebler at 321.net
Tue Dec 7 19:46:43 CET 2010


I am trying to add items to a list view. Just to make sure it works, I add 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
		item2.SubItems.Add(self.currGameTrainer)
		item2.SubItems.Add(self.currGameExe)
		self._listView1.BeginUpdate()
		self._listView1.Items.Add(item2)
		self._listView1.EndUpdate()

What am I doing wrong?

http://old.nabble.com/file/p30399194/MainForm.py MainForm.py 
-- 
View this message in context: http://old.nabble.com/adding-items-to-a-listview-%28what-am-I-doing-wrong%29-tp30399194p30399194.html
Sent from the IronPython mailing list archive at Nabble.com.




More information about the Ironpython-users mailing list