views:

38

answers:

1

Hi,

I have a auiNotebook built from agw library. Now i have added few pages Now i have to delete ALL pages at one shot. Please let me know how to do this.

Or is there any method which gives me List of Page Indexs for All Added Pages so that i can use Delete Page method to delete all pages

Enviroment: Windows,wxpython

A: 

This works.

   while(notebook.GetPageCount()):
        notebook.DeletePage(0)
volting
Hi volting,Thanks for the reply.I had tried that before,But that will only delete first page.Remaining pages are not removed.I have used "DeletePage" since "RemovePage" will not remove the actual content which is inside the page.(I mean For eg. Multiline Text inside notebook page)
abhishek
Your right that would not work, because the index count changes every time a page is removed. Ive fixed the code, and tested, works fine now.
volting