484 self.LibraryPanel = wx.Panel(id=ID_PLCOPENEDITORLIBRARYPANEL, |
484 self.LibraryPanel = wx.Panel(id=ID_PLCOPENEDITORLIBRARYPANEL, |
485 name='LibraryPanel', parent=self, pos=wx.Point(0, |
485 name='LibraryPanel', parent=self, pos=wx.Point(0, |
486 0), size=wx.Size(0, 0), style=0) |
486 0), size=wx.Size(0, 0), style=0) |
487 self.AUIManager.AddPane(self.LibraryPanel, wx.aui.AuiPaneInfo().Caption("Library").Right().Layer(0).BestSize(wx.Size(250, 400)).CloseButton(False)) |
487 self.AUIManager.AddPane(self.LibraryPanel, wx.aui.AuiPaneInfo().Caption("Library").Right().Layer(0).BestSize(wx.Size(250, 400)).CloseButton(False)) |
488 |
488 |
489 self.AUIManager.Update() |
|
490 |
|
491 if wx.Platform == '__WXMSW__': |
489 if wx.Platform == '__WXMSW__': |
492 treestyle = wx.TR_HAS_BUTTONS|wx.TR_SINGLE|wx.SUNKEN_BORDER |
490 treestyle = wx.TR_HAS_BUTTONS|wx.TR_SINGLE|wx.SUNKEN_BORDER |
493 else: |
491 else: |
494 treestyle = wx.TR_HAS_BUTTONS|wx.TR_HIDE_ROOT|wx.TR_SINGLE|wx.SUNKEN_BORDER |
492 treestyle = wx.TR_HAS_BUTTONS|wx.TR_HIDE_ROOT|wx.TR_SINGLE|wx.SUNKEN_BORDER |
495 self.LibraryTree = wx.TreeCtrl(id=ID_PLCOPENEDITORLIBRARYTREE, |
493 self.LibraryTree = wx.TreeCtrl(id=ID_PLCOPENEDITORLIBRARYTREE, |
506 pos=wx.Point(0, 0), size=wx.Size(0, 60), |
504 pos=wx.Point(0, 0), size=wx.Size(0, 60), |
507 style=wx.TE_READONLY|wx.TE_MULTILINE) |
505 style=wx.TE_READONLY|wx.TE_MULTILINE) |
508 |
506 |
509 self._init_sizers() |
507 self._init_sizers() |
510 |
508 |
|
509 if wx.VERSION >= (2, 8, 0): |
|
510 self.AUIManager.Update() |
|
511 |
511 def __init__(self, parent, controler = None, fileOpen = None): |
512 def __init__(self, parent, controler = None, fileOpen = None): |
512 self.ModeSolo = controler == None |
513 self.ModeSolo = controler == None |
513 if self.ModeSolo: |
514 if self.ModeSolo: |
514 self.Controler = PLCControler() |
515 self.Controler = PLCControler() |
515 if fileOpen is not None: |
516 if fileOpen is not None: |