File: wxFrame2.py

package info (click to toggle)
boa-constructor 0.3.0-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,188 kB
  • ctags: 8,857
  • sloc: python: 54,163; sh: 66; makefile: 36
file content (31 lines) | stat: -rw-r--r-- 1,022 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
#Boa:Frame:wxFrame2

from wxPython.wx import *

def create(parent):
    return wxFrame2(parent)

[wxID_WXFRAME2] = map(lambda _init_ctrls: wxNewId(), range(1))

class wxFrame2(wxFrame):
    """ A reference to this frame is kept in frame1 therefor we have to
        stop the frame from being destroyed when it is closed. This is done
        by connecting to the close event and hiding the form """
    def _init_utils(self):
        # generated method, don't edit
        pass

    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wxFrame.__init__(self, id=wxID_WXFRAME2, name='', parent=prnt,
              pos=wxPoint(198, 198), size=wxSize(342, 146),
              style=wxDEFAULT_FRAME_STYLE, title='wxFrame2')
        self._init_utils()
        self.SetClientSize(wxSize(334, 119))
        EVT_CLOSE(self, self.OnWxframe2Close)

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

    def OnWxframe2Close(self, event):
        self.Show(false)