[wxPython-users] Capture close event of a tab in an aui.notebook
Robin Dunn
robin at alldunn.com
Thu Sep 13 12:04:46 PDT 2007
Dominique wrote:
> Hello,
>
> I'd like to capture a close event of a tab in an aui.notebook.
>
> The objective is that when the user closes a tab, several variables are updated.
> I tried on and on without success.
>
> Here is what I think I should do:
>
> #When the tab is created
> self.notebook.AddPage(self.page,"PageLabel")
>
> # Then I try to bind the newly created tab with the close event
> self.page.Bind(wx.EVT_CLOSE,self.DestroyTab)
So close, but yet so far... ;-)
You want wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list