File: wxWizard1.py

package info (click to toggle)
boa-constructor 0.4.4cvs20050714-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,080 kB
  • ctags: 9,175
  • sloc: python: 56,189; sh: 545; makefile: 40
file content (63 lines) | stat: -rw-r--r-- 2,240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#Boa:Wizard:wxWizard1

import wx
import wx.wizard

def create(parent):
    return wxWizard1(parent)

def run(parent):
    wizard = create(parent)

    import wxPyWizardPage1, wxPyWizardPage2
    import wxWizardPageSimple1, wxWizardPageSimple2

    pwpage1 = wxPyWizardPage1.wxPyWizardPage1(wizard)
    pwpage2 = wxPyWizardPage2.wxPyWizardPage2(wizard)
    wspage1 = wxWizardPageSimple1.wxWizardPageSimple1(wizard)
    wspage2 = wxWizardPageSimple2.wxWizardPageSimple2(wizard)

    pwpage1.SetNext(pwpage2)
    pwpage2._next = wspage1
    pwpage2._prev = pwpage1
    wspage1.SetPrev(pwpage2)
    wx.wizard.WizardPageSimple.Chain(wspage1, wspage2)

    return wizard.RunWizard(pwpage1)


[wxID_WXWIZARD1, wxID_WXWIZARD1BUTTON1, wxID_WXWIZARD1STATICTEXT1, 
] = [wx.NewId() for _init_ctrls in range(3)]

class wxWizard1(wx.wizard.Wizard):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.wizard.Wizard.__init__(self, bitmap=wx.Bitmap('WizImage.png',
              wx.BITMAP_TYPE_PNG), id=wxID_WXWIZARD1, parent=prnt,
              pos=wx.Point(333, 205), title='wxWizard Example')
        self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING,
              self.OnWxwizard1WizardPageChanging, id=wxID_WXWIZARD1)
        self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGED,
              self.OnWxwizard1WizardPageChanged, id=wxID_WXWIZARD1)

        self.button1 = wx.Button(id=wxID_WXWIZARD1BUTTON1, label='debug',
              name='button1', parent=self, pos=wx.Point(8, 312),
              size=wx.Size(40, 23), style=0)
        self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
              id=wxID_WXWIZARD1BUTTON1)

        self.staticText1 = wx.StaticText(id=wxID_WXWIZARD1STATICTEXT1,
              label='(status)', name='staticText1', parent=self, pos=wx.Point(8,
              293), size=wx.Size(34, 13), style=0)

    def __init__(self, parent):
        self._init_ctrls(parent)

    def OnButton1Button(self, event):
        wx.LogMessage(`self.GetChildren()`) #GetSizer().

    def OnWxwizard1WizardPageChanging(self, event):
        self.staticText1.SetLabel('Changing...')

    def OnWxwizard1WizardPageChanged(self, event):
        self.staticText1.SetLabel('Changed to %s'%event.GetPage().GetName())