]> git.saurik.com Git - wxWidgets.git/blame - wxPython/samples/wx_examples/basic/frame.py
Force integer values for positions and sizes
[wxWidgets.git] / wxPython / samples / wx_examples / basic / frame.py
CommitLineData
1fded56b
RD
1#!/usr/bin/env python
2
3"""Basic frame class, with App for testing."""
4
5__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
6__cvsid__ = "$Id$"
7__revision__ = "$Revision$"[11:-2]
8
9import wx
10
11class Frame(wx.Frame):
12 """Frame class."""
13
14 def __init__(self, parent=None, id=-1, title='Title',
15 pos=wx.DefaultPosition, size=(400, 200)):
16 """Create a Frame instance."""
17 wx.Frame.__init__(self, parent, id, title, pos, size)
18
19class App(wx.App):
20 """Application class."""
21
22 def OnInit(self):
23 self.frame = Frame()
24 self.frame.Show()
25 self.SetTopWindow(self.frame)
26 return True
27
28def main():
29 app = App()
30 app.MainLoop()
31
32if __name__ == '__main__':
33 main()