I am running wxPython3.0.0 with 32-bit python2.6.
I run the following example. It creates three tabs side by side: “PanelOne”, “PanelTwo”, and “PanelThree”.
I want to use the mouse to drag the tabs on top of each other in order top to bottom: “PanelOne”, “PanelTwo”, and “PanelThree”.
I grab the “PanelTwo” tab and drag it to the bottom. I get a C++ assertion “!wxMouseCapture::IsInCaptureStack(this)”, but after wiggling the mouse carefully I am able to drop the panel below “PanelOne” / “PanelThree” in its own split.
Next I grab the “PanelThree” tab and drag it to the bottom. The blue highlighter doesn’t want to cover the whole bottom of the screen. It wants me to drop the tab into the same split with “PanelTwo” either left or right.
With a little wiggling I get the highlighter to cover the bottom half of the screen. When I release it, “PanelThree” is now the entire bottom split, “PanelTwo” is at the top, and “PanelOne” is barely visible hidden behind “PanelTwo” at the top.
Is this a bug in the component or a bug in my code?
Thanks for the help!
import wx
import wx.lib.agw.aui as aui
class TestPanel(wx.Panel):
def init(self,parent):
wx.Panel.init(self, parent=parent, id=wx.ID_ANY)
sizer = wx.BoxSizer(wx.VERTICAL)
txtOne = wx.TextCtrl(self, wx.ID_ANY, “”)
sizer.Add(txtOne, 0, wx.ALL, 5)
txtTwo = wx.TextCtrl(self, wx.ID_ANY, “”)
sizer.Add(txtTwo, 0, wx.ALL, 5)
self.SetSizer(sizer)
class DemoFrame(wx.Frame):
def init(self):
wx.Frame.init(self, None, -1, “Test”, size=(800,800))
self._mgr = aui.AuiManager()
self._mgr.SetManagedWindow(self)
notebook = aui.AuiNotebook(self)
panelOne = TestPanel(notebook)
panelTwo = TestPanel(notebook)
panelThree = TestPanel(notebook)
notebook.AddPage(panelOne, “PanelOne”, False)
notebook.AddPage(panelTwo, “PanelTwo”, False)
notebook.AddPage(panelThree, “PanelThree”, False)
self._mgr.AddPane(notebook,
aui.AuiPaneInfo().Name(“notebook_content”).
CenterPane().PaneBorder(False))
self._mgr.Update()
#notebook.Split(0,wx.RIGHT)
#notebook.Split(1,wx.BOTTOM)
if name == “main”:
app = wx.PySimpleApp()
frame = DemoFrame()
frame.Show()
app.MainLoop()