How to add double spanning column in list control?

Hi,

I am developing GUI with wxPython. I saw there is some program that
have double spaning columns. For example:

http://static.ez2learn.com/double_column_header.png

As the screenshot shows, there is a spaning column above the lower
column. Some of those columns span two columns. That's what I need,
the problem is, how to do that with wxPython?

Thanks.
Victor Lin.

Hi,

···

On Jul 22, 12:15 pm, Victor Lin <borns...@gmail.com> wrote:

Hi,

I am developing GUI with wxPython. I saw there is some program that
have double spaning columns. For example:

http://static.ez2learn.com/double_column_header.png

As the screenshot shows, there is a spaning column above the lower
column. Some of those columns span two columns. That's what I need,
the problem is, how to do that with wxPython?

Thanks.
Victor Lin.

I'm pretty sure the included ListCtrl doesn't have this feature
included. However, Andrea recently created a pure python
implementation of this control that you can probably hack the way you
want. The source can be found here:

http://xoomer.virgilio.it/infinity77/main/UltimateListCtrl.html

- Mike

Victor Lin wrote:

Hi,

I am developing GUI with wxPython. I saw there is some program that
have double spaning columns. For example:

http://static.ez2learn.com/double_column_header.png

As the screenshot shows, there is a spaning column above the lower
column. Some of those columns span two columns. That's what I need,
the problem is, how to do that with wxPython?

You can make a custom widget for the top row and use the wx.RendererNative to draw it so it will look like a native list ctrl header. (Using the DrawHeaderButton method.) Then you can position that custom control above the listCtrl and it should look very much like the screen shot at your link, you'll just need to manage the position of each column as changes are made in the listctrl.

···

--
Robin Dunn
Software Craftsman