Here is the GUI code

Thanks for your time, beow is my code. It compiles, but no output is displayed: Do I need to put some line in to get the program to display?

Code:

from wx.Python.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
    def __init__(self,parent,id,title):
        wxFrame.__init__(self,parent,-4, title, size = ( 200,100),
                                     style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
        self.control = wxTextCtrl(self, 1, style=wxTE_MULTILINE)
        self.CreateStatusBar() # A Statusbar in the bottom of the window
        # Setting up the menu.
        filemenu= wxMenu()
        filemenu.Append(ID_ABOUT, "&About"," Information about this program")
        filemenu.AppendSeparator()
        filemenu.Append(ID_EXIT,"E&xit"," Terminate the program")
        # Creating the menubar.
        menuBar = wxMenuBar()
        menuBar.Append(filemenu,"&File") # Adding the "filemenu" to the MenuBar
        self.SetMenuBar(menuBar) # Adding the MenuBar to the Frame content.

        self.Show(true)
app = wxPySimpleApp()
frame = MainWindow(None, -1, "Sample editor")
app.MainLoop()

···

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger

[A.T.]

It compiles, but no output is displayed [...]

from wx.Python.wx import *

With Python 2.3 and wxPython 2.4.2.4, changing this line to:

from wxPython.wx import *

makes it work for me. Before changing it, I got a traceback - did you not
get one?

···

--
Richie Hindle
richie@entrian.com

The first line has to be:

from wxPython.wx import *

There is no dot in wxPython btw wx and Python.

···

----- Original Message -----
From: "A. T." <inaleagueofmyown@hotmail.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Monday, December 01, 2003 5:12 PM
Subject: [wxPython-users] Here is the GUI code

Thanks for your time, beow is my code. It compiles, but no output is
displayed: Do I need to put some line in to get the program to display?

Code:

from wx.Python.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
    def __init__(self,parent,id,title):
        wxFrame.__init__(self,parent,-4, title, size = ( 200,100),

style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
        self.control = wxTextCtrl(self, 1, style=wxTE_MULTILINE)
        self.CreateStatusBar() # A Statusbar in the bottom of the window
        # Setting up the menu.
        filemenu= wxMenu()
        filemenu.Append(ID_ABOUT, "&About"," Information about this
program")
        filemenu.AppendSeparator()
        filemenu.Append(ID_EXIT,"E&xit"," Terminate the program")
        # Creating the menubar.
        menuBar = wxMenuBar()
        menuBar.Append(filemenu,"&File") # Adding the "filemenu" to the
MenuBar
        self.SetMenuBar(menuBar) # Adding the MenuBar to the Frame

content.

        self.Show(true)
app = wxPySimpleApp()
frame = MainWindow(None, -1, "Sample editor")
app.MainLoop()

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org