Created
March 12, 2016 10:16
-
-
Save ssbb/420184332880b9207117 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import wx | |
class GeneralPage(wx.StockPreferencesPage): | |
def CreateWindow(self, parent): | |
panel = wx.Panel(parent) | |
panel.SetMinSize((600, 300)) | |
sizer = wx.BoxSizer(wx.VERTICAL) | |
sizer.Add(wx.StaticText(panel, -1, "general page"), | |
wx.SizerFlags(1).TripleBorder()) | |
panel.SetSizer(sizer) | |
return panel | |
class AdvancedPage(wx.StockPreferencesPage): | |
def CreateWindow(self, parent): | |
panel = wx.Panel(parent) | |
panel.SetMinSize((600, 300)) | |
sizer = wx.BoxSizer(wx.VERTICAL) | |
sizer.Add(wx.StaticText(panel, -1, "advanced page"), | |
wx.SizerFlags(1).TripleBorder()) | |
panel.SetSizer(sizer) | |
return panel | |
class Preferences(wx.PreferencesEditor): | |
def __init__(self): | |
super().__init__() | |
self.AddPage(GeneralPage(0)) # 0 is for Kind_General | |
self.AddPage(AdvancedPage(1)) # 1 is for Kind_Advanced | |
app = wx.App() | |
prefs = Preferences() | |
prefs.Show(None) | |
app.MainLoop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment