Re: Remove CanvasItems
- From: Federico Mena Quintero <federico redhat com>
- To: pearl darkride net
- CC: gnome-devel-list gnome org
- Subject: Re: Remove CanvasItems
- Date: Mon, 6 Sep 1999 18:19:58 -0400
> Is it possible to destroy all attached Gnome CanvasItems of a canvas? I
> use the canvas for a game playfield where I have different canvas items in
> a single level. To load a new level, I want to remove all canvas items and
> draw the new level with new canvas items.
The messy way:
Walk the list of children of the canvas' root group, and
destroy them. You'll need to poke at the GnomeCanvasGroup
structure of the root item to do this.
The lazy way:
Create a group and put all your items there. When you are
done with them, destroy the group and create a new one.
The right way:
Keep track of your items in the first place.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]