Created
April 26, 2013 14:24
-
-
Save chadcooper/5467716 to your computer and use it in GitHub Desktop.
A little template to use when dorking around with wxpython and needing to test some functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import wx | |
| class MyPanel(wx.Panel): | |
| def __init__(self, parent, _id): | |
| wx.Panel.__init__(self, parent, _id) | |
| self.SetBackgroundColour("white") | |
| default_font = wx.Font(9, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL) | |
| self.SetFont(default_font) | |
| # Content goes here | |
| # Test static textbox | |
| self.nw_label = wx.StaticText(self, -1, "N of W", pos=(100, 100), | |
| size=wx.DefaultSize) | |
| app = wx.PySimpleApp() | |
| frame = wx.Frame(None, -1, "Template frame...", size=(300, 300)) | |
| MyPanel(frame, -1) | |
| frame.Show(True) | |
| app.MainLoop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment