Re: Cleaning a canvas




>  Here goes an small question:
>  How can I remove all the items in a GnomeCanvas?
> 
>  I have tried an:
>  GList * ptr = canvas -> item_list;
>  while (ptr != NULL)
> {
>  gtk_object_destroy(GTK_OBJECT(ptr -> data));
>  ptr = ptr -> next;
> }
> 
> And some minor variations but it doesn't work.

I would personally create a new group item, and use it as the "root"
for all items you insert.  Then you just kill it (this will destroy
its childs)

miguel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]