This question was asked about a month ago, and I finally got an answer on the
gnome-dev list:
Sebastien Kessler wrote:
>
> I use Python 1.5.1, PyGTK and PyGNOME (I'm learning ;).
>
> 1) How can I erase (clear) the canvas without destroying it with
> canvas.destroy().
>
> That means having added several ellipses with...
>
> canvas = GnomeCanvas()
> ellipse = canvas.root().add('ellipse', x1=x1, y1=y1, x2=x2, y2=y2,
> fill_color='blue',
>
> outline_color='black',width_units=1.0)
>
> ...how can I delete *all* of them and clear the canvas (and how can
> I delete the *last one* or the
> *one just before*).
The C/Gtk+ answer is to use
gtk_object_destroy (GTK_OBJECT (canvasitem))
In Python/Gtk+, that would be
canvasitem.destroy()
Pretty simple :-)
Cheers.
Jeff
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]