This commit was manufactured by cvs2svn to create tag 'wxPy_2_4_0_7'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPy_2_4_0_7@19683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2003-03-21 22:37:32 +00:00
parent 00fd036c18
commit f34f743e78
2226 changed files with 151510 additions and 79502 deletions

View File

@@ -5,43 +5,43 @@ from wxPython.wx import *
## Create a new frame class, derived from the wxPython Frame.
class Dialog(wxDialog):
def __init__(self, parent, title):
# First, call the base class' __init__ method to create the frame
wxDialog.__init__( self, parent, -1, title, wxDefaultPosition, wxDefaultSize )
def __init__(self, parent, title):
# First, call the base class' __init__ method to create the frame
wxDialog.__init__( self, parent, -1, title, wxDefaultPosition, wxDefaultSize )
wxButton(self, wxID_OK, "OK", (10, 10))
wxButton(self, wxID_CANCEL, "Cancel", (50,50))
self.Centre( wxBOTH )
self.Centre( wxBOTH )
# This method is called automatically when the CLOSE event is
# sent to this window
#def OnCloseWindow(self, event):
# self.Destroy()
# This method is called automatically when the CLOSE event is
# sent to this window
#def OnCloseWindow(self, event):
# self.Destroy()
#def OnCloseMe(self, event):
#self.Close(true)
#def OnCloseMe(self, event):
#self.Close(true)
def main():
# Every wxWindows application must have a class derived from wxApp
class App(wxApp):
# Every wxWindows application must have a class derived from wxApp
class App(wxApp):
# wxWindows calls this method to initialize the application
def OnInit(self):
# wxWindows calls this method to initialize the application
def OnInit(self):
# Create an instance of our customized Frame class
dialog = Dialog( NULL, 'test' )
dialog.ShowModal()
# Create an instance of our customized Frame class
dialog = Dialog( NULL, 'test' )
dialog.ShowModal()
print "got here"
dialog.Destroy()
# Tell wxWindows that this is our main window
# Return a success flag
return true
# Tell wxWindows that this is our main window
# Return a success flag
return true
app = App(0) # Create an instance of the application class
app.MainLoop() # Tell it to start processing events
app = App(0) # Create an instance of the application class
app.MainLoop() # Tell it to start processing events