can't see list text of a wxPython ListCtrl widget

sameer sameer_ at email.com
Sat Apr 13 20:04:30 EDT 2002


hi, 
  I am playing around with the wxPython ListCtrl widget, and for some
reason I can't figure out, I am not seeing the text I add to the list.
 I can see the Column Names just fine, just not any item in the list. 
I am pasting the important code below which is part of an init method
of a wxPanel.

        tID = wxNewId()
        self.list = wxListCtrl(self, tID, pos = (5, 5),
style=wxLC_REPORT)
        self.list.SetDimensions(5, 5, 400, 200)
        self.list.InsertColumn(0, "Subject")
        self.list.InsertColumn(1, "Entry")
        self.list.InsertColumn(2, "Date")
        self.list.SetColumnWidth(0, 100)
        self.list.SetColumnWidth(1, 100)
        self.list.SetColumnWidth(2, 100)
        self.list.SetStringItem(0, 0, 'ho')
        self.list.SetStringItem(0, 1, 'b...')
        self.list.SetStringItem(0, 2, '0-2002')
        self.list.SetStringItem(1, 0, 'ho')
        self.list.SetStringItem(1, 1, 'b...')
        self.list.SetStringItem(1, 2, '0002')



Thanks in advance for the help.



More information about the Python-list mailing list