source: SHX/trunk/sandbox/embedshell.py @ 228

Revision 228, 784 bytes checked in by marcus, 10 years ago (diff)

Example for zooming the embedded shell.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Author Revision Date
Line 
1import wx
2import wx.py as wxpy
3
4class Frame1(wx.Frame):
5    def _init_ctrls(self, parent):
6        wx.Frame.__init__(self, id=wx.NewId(), name='', parent=parent,
7              style=wx.DEFAULT_FRAME_STYLE, title='Embedding shell')
8
9        self.SetClientSize(wx.Size(900, 200))
10
11        self.panel1 = wx.Panel(id=wx.NewId(), name='panel', parent=self,
12              style=wx.TAB_TRAVERSAL)
13
14    def __init__(self, parent):
15        self._init_ctrls(parent)
16
17        #this uses py.shell, which is used in PyCrust
18        shell = wxpy.shell.Shell(self.panel1, -1, pos=wx.Point(5, 5),
19          size=wx.Size(890,190))
20        shell.zoom(-3)
21
22        self.panel1.Layout()
23
24if __name__ == '__main__':
25    app = wx.PySimpleApp()
26    frame = Frame1(None)
27    frame.Show()
28
29    app.MainLoop()
Note: See TracBrowser for help on using the repository browser.