Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.splitter = wx.SplitterWindow(self, id = wx.ID_ANY)
- self.panel1 = wx.Panel(self.splitter, id = wx.ID_ANY)
- self.panel2 = wx.Panel(self.splitter, id = wx.ID_ANY)
- self.panel1.SetBackgroundColour(wx.LIGHT_GREY)
- self.splitter.SplitHorizontally(self.panel1, self.panel2)
- def displayNodes(self,event):
- if hasattr(self, "notebook") == False: #If the notebook object has not been already created
- #create notebook if it does not exitst already. This script should be present in every event handler
- self.panel = wx.Panel(self,wx.ID_ANY)
- self.notebook = NotebookDemo(self.panel)
- #creating vertical sizer for the notebook
- self.sizer = wx.BoxSizer(wx.VERTICAL)
- self.sizer.Add(self.notebook, 1, wx.ALL|wx.EXPAND, 5)
- self.panel.SetSizer(self.sizer)
- self.nodesname = "nodes"
- self.nodesinstance = wx.SingleInstanceChecker(self.nodesname)
- if self.nodesinstance.IsAnotherRunning():
- self.notebook.ChangeSelection(self.nodesindex)
- else:
- #creating a tab
- self.nodesTab = TabPanel(self.notebook)
- self.notebook.AddPage(self.nodesTab, "List of all the nodes")
- self.nodes = wx.ListBox(self.nodesTab, 11, (10,40), (200,130), self.nodeslist, wx.LB_SINGLE)
- self.nodesindex = self.notebook.GetPageCount() - 1
- self.notebook.SetSelection(self.nodesindex)
- #self.Bind(wx.EVT_CONTEXT_MENU, self.OnShowPopup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement