01/10/2008, 12:56
|
| | Fecha de Ingreso: mayo-2008
Mensajes: 499
Antigüedad: 16 años, 6 meses Puntos: 1 | |
Respuesta: crear algo con phyton ayuda! le cambie esto Cita: 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)
#--- START NEW CODE: -----------------------------------------------------
self.CreateStatusBar()
#-------- Setting up the menu.
filemenu = wx.Menu(1)
filemenu.Append(ID_ABOUT, "&About","Information obout this program")
filemenu.AppendSeparator()
filemenu.Append(ID_EXIT, "E&xit" "terminate the program")
#-------- Creating the menu.
menubar = wx.MenuBar()
menubar.Append(filemenu,"&File")
self.SetMenuBar(MenuBar)
#--- END NEW CODE --------------------------------------------------------
self.Show(True)
app = wx.PySimpleApp()
frame = MainWindow(None,-1,"universal grapics studio")
frame.Show(1)
app.MainLoop() y me salio esto Cita: Traceback (most recent call last):
File "C:\helloWorld.py", line 24, in ?
frame = MainWindow(None,-1,"universal grapics studio")
File "C:\Python24\Lib\site-packages\wx-2.6-msw-ansi\wx\_windows.py", line 484, in __init__
newobj = _windows_.new_Frame(*args, **kwargs)
PyNoAppError: The wx.App object must be created first!
>>> |