Código Python:
Ver originalimport wx
app = wx.PySimpleApp()
self = wx.Frame(None, -1, "Vonceff", size=(600,600))
Panel = wx.Panel(self)
Notebook = wx.Notebook(Panel)
def start():
def delate(event):
page_2.Show(False)
page_2 = wx.Panel(Notebook)
a = wx.Button(page_2, -1, "Eliminar pestana")
a.Bind(wx.EVT_BUTTON,delate)
Notebook.AddPage(page_2, "Tab 1")
start()
start()
sizer = wx.BoxSizer()
sizer.Add(Notebook, 1, wx.EXPAND)
Panel.SetSizer(sizer)
self.Show()
app.MainLoop()
Tu problema era muy simple, usa Show en vez de Destroy