[wxPython-users] A simple function but doesn't work!
Christopher Barker
Chris.Barker at noaa.gov
Wed Nov 22 08:11:52 PST 2006
Peter Damoc wrote:
> the code you wrote is, at least from a concept point of view equivalent to:
>
> for object in listObjects:
> canvas.RemoveObject(object)
> listObjects = []
indeed. And as this looks like FloatCanvas code, you can do:
canvas.RemoveObjects(listObjects) # note the plural
listObjects = []
If listObjects contains ALL of the objects on the Canvas, you can just do:
Canvas.ClearAll()
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list