#!/usr/bin/env python

import wx
import wx.aui as aui

#
# in this code, the first frame is unmovable, if we have a toolbar present.  Seems to be a Linux problem only.
#    wxPython 2.9.1.1 compiled on SuSe 11.1.
#   
#    I also tested this on other platforms:
#    - Windows, 2.9.1.1 stock: no problem 
#    - OSX, 2.8.11 compiled: no problem
#    - OSX, 2.9.1.1 carbon, compiled: no problem 
#    - OSX: 2.9.1.1 cocoa, compiled: no problem 

class MainFrame(wx.Frame):
   def __init__(self):
      wx.Frame.__init__(self, None, -1, "AUI Problem 2.9.1.1", size=(1024, 768))

      # put together a mock menu
      menubar = wx.MenuBar()
      menu = wx.Menu()
      menu.Append(-1,"Open")
      menubar.Append(menu,"File")
      self.SetMenuBar(menubar)

      # put together a mock toolbar.
      toolbar = self.CreateToolBar()
      toolbar.AddLabelTool(-1,"toolbarbutton",wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN))
      toolbar.Realize()

      self._mgr = aui.AuiManager(self)
      
      self.panel1 = wx.Panel(self,size=(300,200))
      self.panel2 = wx.Panel(self,size=(200,200)) 
      
      self._mgr.AddPane(self.panel1, aui.AuiPaneInfo())
      self._mgr.AddPane(self.panel2, aui.AuiPaneInfo())
      
      self._mgr.Update()




app = wx.App()
frame = MainFrame()
frame.Show(True)
app.MainLoop()
        
    
    
    
    

          

         
         
