]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/embedded/embedded_sample.py
Fix or add some DoGetBestSize's
[wxWidgets.git] / wxPython / samples / embedded / embedded_sample.py
index f98c3f3efb5e606a7c83e5eaff2132f78a517785..5fa38aba931e00b0f8ade1f704e1a68d94a9a50b 100644 (file)
@@ -1,24 +1,21 @@
-from wxPython.wx import *
-from wxPython.lib.PyCrust import shell, version
+import wx
+from wx.py import shell, version
 
-class MyPanel(wxPanel):
+class MyPanel(wx.Panel):
     def __init__(self, parent):
-        wxPanel.__init__(self, parent, -1)
-        print parent
+        wx.Panel.__init__(self, parent, -1)
 
-        text = wxStaticText(self, -1,
+        text = wx.StaticText(self, -1,
                             "Everything on this side of the splitter comes from Python.")
-        text.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD))
+        text.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))
 
         intro = 'Welcome To PyCrust %s - The Flakiest Python Shell' % version.VERSION
         pycrust = shell.Shell(self, -1, introText=intro)
         #pycrust = wxTextCtrl(self, -1, intro)
 
-        sizer = wxBoxSizer(wxVERTICAL)
-        sizer.Add(text, 0, wxEXPAND|wxALL, 10)
-        sizer.Add(pycrust, 1, wxEXPAND|wxBOTTOM|wxLEFT|wxRIGHT, 10)
+        sizer = wx.BoxSizer(wx.VERTICAL)
+        sizer.Add(text, 0, wx.EXPAND|wx.ALL, 10)
+        sizer.Add(pycrust, 1, wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, 10)
 
         self.SetSizer(sizer)
-        #self.SetAutoLayout(true)
-        #self.Layout()