widget for list of dicts

Not sure if this is really for the dev or the users list, but will try
here.

I want to create a widget for users to edit a list of dicts. I've got
in my head something like the widget that allows conditions to be
added to an email search, with a series of ctrls (one per field in the
dict) and a pair of plus/minus buttons to add/remove this entry.

Couldn't see anything like that prebuilt (but maybe I missed it, or
maybe someone has done this in a way I could borrow).

I figured I'd do it as a GridBagSizer, or possibly a Flex, and simply
create my own buttons and ctrls. But one thing that it would need is
the ability to insert or remove a row in the middle of the 'list' and
I couldn't see a good way to do that other than by adding a row to the
end and then manually moving all ctrls down one.

Has anyone conquered this beast before, or can point me to a solution
I haven't thought of (preferably not using a table or a treelist - I
don't think those would have the right look/feel for this case).

FWIW it would be to include in a GPL app, www.psychopy.org

cheers,
Jon

I’m having trouble imagining what this should look like, since I’m not sure which email search you’re referring to. And is a “field” in a dict the same as a key:value pair? How is a dict represented in the widget’s display? Just a string?

Is what the user is editing simply the presence or absence of a dict in the list? If a dict is absent, how do you display it such that it should be added to the list?

But overall, I don’t see why the list item’s nature as a dict should matter and therefore justify a whole new widget–why can’t you just use the list widgets, like ListCtrl, (and maybe wxChoice for adding dicts) for this?

Che

···

On Sun, Oct 9, 2011 at 3:49 PM, Jon jon.peirce@gmail.com wrote:

Not sure if this is really for the dev or the users list, but will try

here.

I want to create a widget for users to edit a list of dicts. I’ve got

in my head something like the widget that allows conditions to be

added to an email search, with a series of ctrls (one per field in the

dict) and a pair of plus/minus buttons to add/remove this entry.