wx.ListCtrl with style=wx.LC_LIST - can't get more than one column to appear.

I am unable to find documentation on how to populate a multi-column
ListCtrl in LC_LIST mode. Comments in wxWidgets suggest that you
first do an InsertItem for the first item and then SetItem's to fill
in values in successive columns. This only has populated the first
column for me on Windows. Could this be a case where it really is not
implemented? The demo example only illustrates LC_REPORT mode in
which I have successfully populated multiple columns. A clue or
example would be appreciated.

What are you trying to do? If you want columns use report mode, if you
just want to list items use the list mode.

Mark

···

On Dec 18, 1:29 pm, Andy <amarcuv...@gmail.com> wrote:

I am unable to find documentation on how to populate a multi-column
ListCtrl in LC_LIST mode. Comments in wxWidgets suggest that you
first do an InsertItem for the first item and then SetItem's to fill
in values in successive columns. This only has populated the first
column for me on Windows. Could this be a case where it really is not
implemented? The demo example only illustrates LC_REPORT mode in
which I have successfully populated multiple columns. A clue or
example would be appreciated.

In LIST mode there is no way to have more than one column for each item. That is what REPORT mode is for. The implementation may layout items in more than one column in LIST mode, but that should be considered an implementation detail. IOW, you have no control over it.

···

On 12/17/10 9:29 PM, Andy wrote:

I am unable to find documentation on how to populate a multi-column
ListCtrl in LC_LIST mode. Comments in wxWidgets suggest that you
first do an InsertItem for the first item and then SetItem's to fill
in values in successive columns. This only has populated the first
column for me on Windows. Could this be a case where it really is not
implemented? The demo example only illustrates LC_REPORT mode in
which I have successfully populated multiple columns. A clue or
example would be appreciated.

--
Robin Dunn
Software Craftsman

This is what made me think LIST mode supported multiple column (from
wxWidgets docs)

"wxLC_LIST Multicolumn list view, with optional small icons. Columns
are computed automatically, i.e. you don't set columns as in
wxLC_REPORT. In other words, the list wraps, unlike a wxListBox."

Thanks for clarifying.

AM

···

On Dec 18, 2:27 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 12/17/10 9:29 PM, Andy wrote:

> I am unable to find documentation on how to populate a multi-column
> ListCtrl in LC_LIST mode. Comments in wxWidgets suggest that you
> first do an InsertItem for the first item and then SetItem's to fill
> in values in successive columns. This only has populated the first
> column for me on Windows. Could this be a case where it really is not
> implemented? The demo example only illustrates LC_REPORT mode in
> which I have successfully populated multiple columns. A clue or
> example would be appreciated.

In LIST mode there is no way to have more than one column for each item.
That is what REPORT mode is for. The implementation may layout items
in more than one column in LIST mode, but that should be considered an
implementation detail. IOW, you have no control over it.

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