Hello All, I'm trying to create a Frame with AuiManager. The code is attached.
*Problem:* - I want 2 windows to be docked in the frame. One is a text control and other is a list control. - The text control gets docked, but on trying to dock the list control, all the tabs dis-appear. The tabs appear only when the list control window is kept floating. In the attached code the list control window is kept floating. This can be docked To see the issue with docking, comment line 33 and un-comment line 35 in the attached file and then try to execute, the issue would be clearly visible. On un-docking the window1, the tabs again appear.. *Please let me the solution to this ASAP*
import wx import wx.aui from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin class AutoWidthListCtrl(wx.ListCtrl, ListCtrlAutoWidthMixin): def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT) ListCtrlAutoWidthMixin.__init__(self) class Log(wx.Panel): def __init__(self, parent,id): wx.Panel.__init__(self, parent, id) list = AutoWidthListCtrl(self) list.InsertColumn(0, 'Tab1',width=60) list.InsertColumn(1, 'Tab2',width=60) list.InsertColumn(2, 'Tab3', width=60) list.InsertColumn(3, 'Tab4', width=60) list.InsertColumn(4, 'Tab5', width=60) list.InsertColumn(5, 'Tab6', width=60) self.list = list class Test(wx.Frame): def __init__(self, parent,id =-1, title='Test'): wx.Frame.__init__(self, parent, id, title, size = (400, 600)) def MakeAll(self): self._mgr = wx.aui.AuiManager(self) self.log = Log(self,-1) self.list = wx.TextCtrl(self, -1,style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) self._mgr.AddPane(self.list, wx.aui.AuiPaneInfo().Bottom().Caption("Window2").MinSize((-1, 100)).FloatingSize(wx.Size(400, 100)).CloseButton(False).MaximizeButton(False)) # The line below creates a list control window is created that is floating self._mgr.AddPane(self.log.list, wx.aui.AuiPaneInfo().Bottom().MinSize((-1, 100)).Caption("Window1").Float().FloatingSize(wx.Size(400, 100)).CloseButton(False).MaximizeButton(False)) # The line below if uncommented and the line above commented, a list control window is craeted that is docked #self._mgr.AddPane(self.log.list, wx.aui.AuiPaneInfo().Bottom().MinSize((-1, 100)).Caption("Window1").FloatingSize(wx.Size(400, 100)).CloseButton(False).MaximizeButton(False)) self._mgr.Update() app_main = wx.PySimpleApp() frame = Test(None) frame.MakeAll() frame.Show() app_main.MainLoop()
-- http://mail.python.org/mailman/listinfo/python-list