Bernie Hogan wrote:
>Hi Everyone,
>
>I'm trying to create a child window that pops-up a list of things to be
>toggled on and off. The list length will not be known ahead of time (think
>the little checkboxes next to songs in iTunes). So two things came to mind:
>1. ListCtrl with some widget embedded in the cells (seems hard).
>2. A scrolled pane.
>
>I don't recall a scrolled pane being a part of pythoncard, but I'm
>interested learning how I could implement it and talk to it like a
>pythoncard background rather than a wxPython pane.
>
>I'm also interested in other suggestions.
>
>
How about a Grid, using wxGridCellBoolEditor and wxGridCellBoolRenderer
to get the checkboxes ?
(note there is a basic grid component in components/grid.py, and a
sample in samples/simplegrid.py
I modified this by adding
> mygrid.SetCellValue(1, 0, "1")
> mygrid.SetCellEditor(1, 0, grid.GridCellBoolEditor())
> mygrid.SetCellRenderer(1, 0, grid.GridCellBoolRenderer())
to verify the basic idea).
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 20/01/2006
|