Displaying 1 result from an estimated 1 matches for "mylistitem".
Did you mean:
listitem
2009 Oct 24
6
Working with ListCtrl and ListItem
...ach do |data|
self.insert_item(i, data.name)
self.set_item(i,1,data.code)
self.set_item(i,2,data.description)
i = i + 1
end
end
I think it would be better to subclass Wx::ListItem and add instances
of this class to the List. Something like this (not tested):
class MyListItem < Wx::ListItem
def initialize(data_object, *args)
super(*args)
# here I need to add the column data, but I don''t know how
end
end
my_list.add_item(MyListItem.new(data_object))
But I have no idea how I can fill the columns in my ListItem-Object.
Any ideas how I can do...