Kirix Support Forums

Preventing last tab from closing

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Preventing last tab from closing

Postby chaoticbob on Fri Jul 06, 2007 12:50 pm

Hi,

I was wondering if there was a way to intercept an "on page close" or something of the sort to prevent the user from being able to close the last tab?

Thanks,
Hai
chaoticbob
Registered User
 
Posts: 3
Joined: Fri Jul 06, 2007 12:48 pm

Re: Preventing last tab from closing

Postby Ben on Sun Jul 08, 2007 10:39 am

Hi there,

Try handling wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE and call event.Veto() to let wxAuiNotebook know that you don't want the window to be closed.

Best,
Ben
Ben Williams
Kirix Support Team
User avatar
Ben
Kirix Support Team
 
Posts: 522
Joined: Mon Dec 19, 2005 6:29 am

Re: Preventing last tab from closing

Postby chaoticbob on Sat Jul 14, 2007 1:05 pm

Thanks, Ben.

This worked out very well.
chaoticbob
Registered User
 
Posts: 3
Joined: Fri Jul 06, 2007 12:48 pm

Return to wxAUI Questions, Thoughts & Feedback