ListCtr with widgets in rows

6 views
Skip to first unread message

Mauro

unread,
Dec 14, 2009, 6:02:53 AM12/14/09
to wxPython-users
Dear list,

I'd need to have a ListCtrl-like widget with a column with checkboxes
(not the first column and with checkboxes only for some rows, or the
possibility to disable some checkboxes).

Moreover, is it possibile to start from a ListView and modify it to
suit my needs? Or should I stick to ListCtrl?

My environment:
Python 2.5.4
wx 2.8.9.2

Thanks a lot for any hint.

Mauro

Andrea Gavana

unread,
Dec 14, 2009, 6:10:57 AM12/14/09
to wxpytho...@googlegroups.com
Hi,

2009/12/14 Mauro:
> Dear list,
>
> I'd need to have a ListCtrl-like widget with a column with checkboxes
> (not the first column and with checkboxes only for some rows, or the
> possibility to disable some checkboxes).

There is no way to do this with wx.ListCtrl or wx.ListView. It might
be done with ObjectListView:

http://objectlistview.sourceforge.net/python/

But I have no idea as I have never used it. But can easily be done
with UltimateListCtrl, which you can grab from the wxPython SVN:

http://svn.wxwidgets.org/svn/wx/wxPython/3rdParty/AGW/

> My environment:
> Python 2.5.4
> wx 2.8.9.2

You should upgrade to wxPython 2.8.10.1.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
http://thedoomedcity.blogspot.com/

Mauro

unread,
Dec 14, 2009, 6:36:58 AM12/14/09
to wxPython-users
Hi Andrea,
I'll take a look at both classes you suggested.

Thanks a lot for your quick reply and for your contributions to wx.

Cheers,
Mauro

michael h

unread,
Dec 16, 2009, 8:56:06 PM12/16/09
to wxPython-users
I like and often use ObjectListView, but it's just a wrapper for a
ListCtrl, You can install a checkboxes in any column, but I don't
believe you can pick and choose rows.
I don't think you can make a checkbox disabled, but you could
certainly prevent it from being checked and perhaps grey out the text
to hint at the intended idea.

Andrea's ULC is the way to go here I believe..

You should have both handy for the future in my opinion though...

Looking forward to the DataViewCtrl which I think we're getting in the
next wxpython version

- michael

Reply all
Reply to author
Forward
0 new messages