File: wxGrid.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 (42 lines) | stat: -rw-r--r-- 1,242 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
#Boa:Frame:wxFrame1

from wxPython.wx import *
from wxPython.grid import *

def create(parent):
    return wxFrame1(parent)

[wxID_WXFRAME1, wxID_WXFRAME1GRID1,
] = map(lambda _init_ctrls: wxNewId(), range(2))

class wxFrame1(wxFrame):
    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_WXFRAME1, name='', parent=prnt,
              pos=wxPoint(318, 214), size=wxSize(432, 242),
              style=wxDEFAULT_FRAME_STYLE, title='wxFrame1')
        self._init_utils()
        self.SetClientSize(wxSize(424, 215))

        self.grid1 = wxGrid(id=wxID_WXFRAME1GRID1, name='grid1', parent=self,
              pos=wxPoint(0, 0), size=wxSize(424, 215), style=0)
        self.grid1.EnableGridLines(true)

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

        # Either CreateGrid or SetTable must be manually added in your code
        # before you populate the grid
        self.grid1.CreateGrid(3, 3)


if __name__ == '__main__':
    app = wxPySimpleApp()
    wxInitAllImageHandlers()
    frame = create(None)
    frame.Show()
    app.MainLoop()