cannot put flatmenu in frame

hello i can`t work with this flatmenu i can`t put in top of window and
the managedwindow do you can help me i try to do like the example of
flatmenu in the pydocs
well this is my code

import wx
import wx.lib.agw.aui as waui
import wx.lib.agw.flatmenu as flm

class Frame(wx.Frame):
    def __init__(self, parent, id):
        wx.Frame.__init__(self, parent, id)

        self.mgr = waui.AuiManager()
        self.mgr.SetManagedWindow(self)

        self.CreateMenu()

        panel = wx.Panel(self, -1)
        btn = wx.Button(panel ,-1, "Hello", (15, 12), (100, 120))

        m_sz = wx.BoxSizer(wx.VERTICAL)
        m_sz.Add(self.menubar, 0, wx.EXPAND)
        m_sz.Add(panel, 1, wx.EXPAND)

        self.SetSizer(m_sz)
        m_sz.Layout()
        self.mgr.AddPane(panel, waui.AuiPaneInfo().Name
("panel1").CenterPane())
        self.menubar.PositionAUI(self.mgr) #here if i write this line
give me error if not the menu does`nt show of all
        self.mgr.Update()

    def CreateMenu(self):
        self.menubar = flm.FlatMenuBar(self, -1)
        f_menu = flm.FlatMenu()
        e_menu = flm.FlatMenu()
        v_menu = flm.FlatMenu()
        t_menu = flm.FlatMenu()
        w_menu = flm.FlatMenu()

        #append f_menu
        f_menu.Append(-1, "Abrir\tCtrl+N", "Text", None)
        e_menu.Append(-1, "Abrir", "Text", None)
        v_menu.Append(-1, "Abrir", "Text", None)
        t_menu.Append(-1, "Abrir", "Text", None)
        w_menu.Append(-1, "Abrir", "Text", None)

        #append menus to menubar
        self.menubar.Append(f_menu, "&Archivo")
        self.menubar.Append(e_menu, "&Edicion")
        self.menubar.Append(v_menu, "&Ver")
        self.menubar.Append(t_menu, "&Herramientas")
        self.menubar.Append(w_menu, "&Ventanas")

app = wx.App()
Frame(None, -1).Show()
app.MainLoop()

and this the error

Traceback (most recent call last):
  File "C:\Documents and Settings\oskarp\Mis documentos
\NetBeansProjects\latest\src\main.py", line 59, in <module>
    Frame(None, -1).Show()
  File "C:\Documents and Settings\oskarp\Mis documentos
\NetBeansProjects\latest\src\main.py", line 29, in __init__
    self.menubar.PositionAUI(self.mgr)
  File "C:\Python26\lib\site-packages\wx-2.8-msw-ansi\wx\lib\agw
\flatmenu.py", line 1634, in PositionAUI
    mgr.AddPane(self, pn)
  File "C:\Python26\lib\site-packages\wx-2.8-msw-ansi\wx\lib\agw\aui
\framemanager.py", line 3907, in AddPane
    return self.AddPane1(window, arg1)
  File "C:\Python26\lib\site-packages\wx-2.8-msw-ansi\wx\lib\agw\aui
\framemanager.py", line 3949, in AddPane1
    pinfo.buttons = []
TypeError: in method 'AuiPaneInfo_buttons_set', expected argument 2 of
type 'wxAuiPaneButtonArray'

···

Hi,

2009/9/23 iozk_Live:

hello i can`t work with this flatmenu i can`t put in top of window and
the managedwindow do you can help me i try to do like the example of
flatmenu in the pydocs
well this is my code

import wx
import wx.lib.agw.aui as waui
import wx.lib.agw.flatmenu as flm

FlatMenu was originally designed to work with wx.aui, and not with
wx.lib.agw.aui, hence the error you are seeing. I have committed a
change in SVN which enables you to use either wx.aui or
wx.lib.agw.aui. The new flatmenu lives here:

http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/flatmenu.py?revision=62024&view=markup

Thank you for the bug report.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

and what i do with this file? replace in the last?

You download it and you place it in the "agw" folder, which on my
Windows box resides in the following location:

C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw

Then you import it with something like

from wx.lib.agw import flatmenu

···

On Sep 23, 1:03 pm, iozk_Live <iozk...@gmail.com> wrote:

and what i do with this file? replace in the last?

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org