notebook_flags = aui.AUI_NB_DEFAULT_STYLE
# | aui.AUI_NB_TAB_EXTERNAL_MOVE | aui.AUI_NB_TAB_MOVE | aui.AUI_NB_TAB_FLOAT| wx.NO_BORDER
self.nb.SetAGWWindowStyleFlag(notebook_flags)
- self.nb.SetArtProvider(aui.VC8TabArt())
+ #self.nb.SetArtProvider(aui.VC8TabArt())
+ nbart = self.nb.GetArtProvider()
+ nbart.SetBaseColour('blue')
self.nb.SetFont(wx.Font(self.fontsize, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
#self.nb.SetArtProvider(aui.VC8TabArt())
#self.nb.parent = self
#self._mgr.AddPane(self.Sheet, wx.aui.AuiPaneInfo().Name("Data").CenterPane())
#self._mgr.AddPane(self.Sheet, aui.AuiPaneInfo().Name("Data").CenterPane())
- self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.OnCloseTab)
+ self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CLOSED, self.OnCloseTab)
self.nb.Bind(aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
#------------------------------------------------------------------------------------------------
def OnCloseTab(self, evt):
#log.info('Closing tab %s' % str(evt.GetEventObject()))
ctrl = evt.GetEventObject()
+ print('page lcose', ctrl)
if isinstance(ctrl.GetParent(), aui.AuiNotebook) or isinstance(ctrl.GetParent(), wx.Panel):
notebook = True
else :
notebook = False
- page = self.nb.GetPage(self.nb.GetSelection())
+ page = self.nb.GetPage(ctrl.GetSelection())
if 'parametres' in dir(page) and isinstance(ctrl.GetParent(), IraFrame) :
self.history.rmtab(page.parametres)
self.tree.CloseItem(uuid = page.parametres['uuid'])