Re: Menu bar on OS X

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Menu bar on OS X

pherrman.sgu
i had the same problem lol!

On Wednesday, June 3, 2009 at 10:27:08 AM UTC-4, Evan Johnson wrote:
Hello all --

I'm new here, newish to Python and completely new to wxPython.  I've
got what is inevitably, I fear, a stupid question: I can't get a menu
bar to appear.  At all.  Even demo.py doesn't show a menu bar when it
should, and this boilerplate demo code also doesn't show a menu bar
(although all other elements are in place):

----

#!/usr/bin/python
import wx
ID_ABOUT = 101
ID_EXIT = 110

class MainWindow(wx.Frame):
    def __init__(self,parent,id,title):
        wx.Frame.__init__(self,parent,wx.ID_ANY,title,size = (400,
200),style = wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
        self.control = wx.TextCtrl(self,1,style = wx.TE_MULTILINE)

        self.CreateStatusBar()
        self.SetStatusText("Hello there")

        filemenu = wx.Menu()
        filemenu.Append(ID_ABOUT, "&About", "Information about this
program.")
        filemenu.AppendSeparator()
        filemenu.Append(ID_EXIT, "E&xit", "Terminate the program.")

        menubar = wx.MenuBar()
        menubar.Append(filemenu, "&File")
        self.SetMenuBar(menubar)

        self.Show(True)

app = wx.PySimpleApp()
frame = MainWindow(None, -1, "Small Editor")

app.MainLoop()

---

I'm on OS X 10.5.7, Python 2.5.2, wxPython 2.8.10.1.  It occurs to me
I might have a version compatibility problem -- is this so?

Thanks in advance!

EJ

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.