]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/tests/test1.py
2 #----------------------------------------------------------------------------
4 # Purpose: A minimal wxPython program
10 # Copyright: (c) 1998 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------------
15 from wxPython
import *
18 #---------------------------------------------------------------------------
20 class MyFrame(wxFrame
):
21 def __init__(self
, parent
, id, title
):
22 wxFrame
.__init
__(self
, parent
, id, title
, wxPoint(100, 100), wxSize(160, 100))
23 self
.Connect(-1, -1, wxEVT_MOVE
, self
.OnMove
)
25 def OnCloseWindow(self
, event
):
28 def OnSize(self
, event
):
29 size
= event
.GetSize()
30 print "size:", size
.width
, size
.height
32 def OnMove(self
, event
):
33 pos
= event
.GetPosition()
34 print "pos:", pos
.x
, pos
.y
38 #---------------------------------------------------------------------------
43 frame
= MyFrame(NULL
, -1, "This is a test")
45 self
.SetTopWindow(frame
)
48 #---------------------------------------------------------------------------
60 if __name__
== '__main__':
65 #----------------------------------------------------------------------------
68 # Revision 1.2 1998/10/02 06:42:27 RD
69 # Version 0.4 of wxPython for MSW.
71 # Revision 1.1 1998/08/09 08:28:05 RD