about ComboCtrl in wxpython demo( more windows/controls)

I want to get a popup comboctrl like this demo, but I only need one
column in the list . So I try to change the style from wx.LIST to
wx.LC_REPORT in demo code. But the demo doesn't work. Most (relative
to the change) popups looks like blank. When I change the counts of
item , the length of ComboPopup changed. It seems only the content
can't be displayed. Could you tell me why and how to fix? Thans a
lot.
             ( wxpython 2.8.10.1 for python 2.5)
line 68~74
    def Create(self, parent):
        self.log.write("ListCtrlComboPopup.Create")
        wx.ListCtrl.Create(self, parent,
                           style=wx.LC_REPORT|wx.LC_SINGLE_SEL|
wx.SIMPLE_BORDER)
        self.Bind(wx.EVT_MOTION, self.OnMotion)
        self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
        return True

line 444~445
        for x in range(75):
            popup.AddItem("Item-%02d" % x)

You probably forgot to add the column, which is a required step when using report mode.

···

On 9/29/09 6:42 PM, Richard wrote:

I want to get a popup comboctrl like this demo, but I only need one
column in the list . So I try to change the style from wx.LIST to
wx.LC_REPORT in demo code. But the demo doesn't work. Most (relative
to the change) popups looks like blank. When I change the counts of
item , the length of ComboPopup changed. It seems only the content
can't be displayed. Could you tell me why and how to fix? Thans a
lot.

--
Robin Dunn
Software Craftsman

Yes, I forgot to add the column. Thank you very much for your help.

···

On 10月1日, 上午1时37分, Robin Dunn <ro...@alldunn.com> wrote:

On 9/29/09 6:42 PM, Richard wrote:

> I want to get a popup comboctrl like this demo, but I only need one
> column in the list . So I try to change the style from wx.LIST to
> wx.LC_REPORT in demo code. But the demo doesn't work. Most (relative
> to the change) popups looks like blank. When I change the counts of
> item , the length of ComboPopup changed. It seems only the content
> can't be displayed. Could you tell me why and how to fix? Thans a
> lot.

You probably forgot to add the column, which is a required step when
using report mode.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org