What event is used when I close a tab in an auinotebook? I tested EVT_AUINOTEBOOK_PAGE_CLOSE (D). This did not work.
I would also like to start a right click on the event of the deposit itself.
Where can I find all events that can be used with aui manager / laptop? There may be only my poor search skills, but I can not find lists for various events that exist, and not for mouse / window events. It would be very convenient to have a complete list.
#!/usr/bin/python #12_aui_notebook1.py import wx import wx.lib.inspection class MyFrame(wx.Frame): def __init__(self, *args, **kwds): wx.Frame.__init__(self, *args, **kwds) self.nb = wx.aui.AuiNotebook(self) self.new_panel('Page 1') self.new_panel('Page 2') self.new_panel('Page 3') self.nb.Bind(wx.EVT_AUINOTEBOOK_PAGE_CLOSED, self.close) def new_panel(self, nm): pnl = wx.Panel(self) pnl.identifierTag = nm self.nb.AddPage(pnl, nm) self.sizer = wx.BoxSizer() self.sizer.Add(self.nb, 1, wx.EXPAND) self.SetSizer(self.sizer) def close(self, event): print 'closed' class MyApp(wx.App): def OnInit(self): frame = MyFrame(None, -1, '12_aui_notebook1.py') frame.Show() self.SetTopWindow(frame) return 1 if __name__ == "__main__": app = MyApp(0) # wx.lib.inspection.InspectionTool().Show() app.MainLoop()
Oerjan Pettersen
python wxpython wxwidgets
Orjanp
source share