All-on, all-off button for checkbuttons?

Nick Arnett narnett at mccmedia.com
Mon Feb 25 14:06:58 EST 2002


I'm just bringing myself up to speed with Python, so forgive what I think is
an simple question.  I'm building a UI that has a bunch of checkbuttons,
which also includes buttons to turn all the checkbuttons on or off.  I see
how to turn them off individually, but it seems to me that there must be a
more elegant way.

The checkbuttons are created in __init__.  I'm thinking that there must be a
way to filter or iterate through the objects in __init__, and for each one,
if it's a button, select or deselect as appropriate.  I see how to get the
namespace as a dictionary, but that hasn't helped.

I've searched the archives of this group and found lots of hints, but not
the answer I'm looking for.  I suspect it lies in parts of the language I
haven't yet explored... I started with the UI, since that's where I'm
weakest.

Thanks,

Nick Arnett
narnett at mccmedia.com





More information about the Python-list mailing list