Hi all.
i 've used wx.aui.Manager to manage three panels.
How do I disable the button of closing of each panel?
I do not want that each panel can be closed
Here's' my code:
import wx
import wx.aui
import wx.lib.flatnotebook
class MyFrame(wx.Frame):
def __init__(self, *args, **kwargs):
wx.Frame.__init__(self, None,
title='TITLE_FRAME',size=(700,600),pos=(0,0))
self.mgr = wx.aui.AuiManager(self)
leftpanel = wx.Panel(self, -1, size = (400, 300),style=wx.BORDER)
rightpanel = wx.Panel(self, -1, size = (400, 300))
# -> inizializzazione notebookGrid
notebookGrid =
wx.lib.flatnotebook.FlatNotebook(leftpanel,-1,style=wx.NB_FIXEDWIDTH|wx.NB_MULTILINE)
notebookGrid.AddPage(None, '',select=True)
sizer = wx.BoxSizer()
sizer.Add(notebookGrid,1, wx.EXPAND, 5)
leftpanel.SetSizer(sizer)
# -> fine
panelGrid = wx.Panel(self, -1)
notebookGrid.AddPage(panelGrid, 'tab',select=True)
bottompanel = wx.Panel(self, -1, size = (400, 300))
# -> inizializzazione notebookGrid
notebook =
wx.lib.flatnotebook.FlatNotebook(bottompanel,-1,style=wx.NB_FIXEDWIDTH|wx.NB_MULTILINE)
notebook.AddPage(None, '',select=True)
sizer = wx.BoxSizer()
sizer.Add(notebook,1, wx.EXPAND, 5)
bottompanel.SetSizer(sizer)
# -> fine
panelBottom = wx.Panel(self, -1)
notebook.AddPage(panelBottom, 'bottom',select=True)
self.mgr.AddPane(leftpanel, wx.aui.AuiPaneInfo().Bottom())
self.mgr.AddPane(rightpanel, wx.aui.AuiPaneInfo().Left().Layer(1))
self.mgr.AddPane(bottompanel, wx.aui.AuiPaneInfo().Center().Layer(2))
self.mgr.Update()
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, '07_wxaui.py')
frame.Show()
self.SetTopWindow(frame)
return 1
if __name__ == "__main__":
app = MyApp(0)
app.MainLoop()
thanks in advanced
···
--
Fabio