-
Notifications
You must be signed in to change notification settings - Fork 1
/
complex_app.py
99 lines (80 loc) · 3.17 KB
/
complex_app.py
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
# generated by wxGlade 0.6.2 on Tue Mar 03 11:05:41 2009
import wx
# begin wxGlade: extracode
# end wxGlade
class Fr2(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: Fr2.__init__
kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX|wx.MAXIMIZE_BOX|wx.SYSTEM_MENU|wx.RESIZE_BORDER|wx.FRAME_TOOL_WINDOW|wx.CLIP_CHILDREN
wx.Frame.__init__(self, *args, **kwds)
self.button_1 = wx.Button(self, -1, "button_1")
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.BtnOK, self.button_1)
# end wxGlade
def __set_properties(self):
# begin wxGlade: Fr2.__set_properties
self.SetTitle("frame_2")
self.SetBackgroundColour(wx.Colour(128, 128, 128))
self.SetForegroundColour(wx.Colour(0, 0, 0))
self.button_1.SetFont(wx.Font(9, wx.SCRIPT, wx.NORMAL, wx.NORMAL, 0, ""))
# end wxGlade
def __do_layout(self):
# begin wxGlade: Fr2.__do_layout
sizer_3 = wx.BoxSizer(wx.VERTICAL)
sizer_3.Add(self.button_1, 0, wx.ALL, 5)
self.SetSizer(sizer_3)
sizer_3.Fit(self)
self.Layout()
# end wxGlade
def BtnOK(self, event): # wxGlade: Fr2.<event_handler>
print "Event handler `BtnOK' not implemented!"
event.Skip()
# end of class Fr2
class Fram1(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: Fram1.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.button_2 = wx.Button(self, -1, "button_2")
self.button_3 = wx.Button(self, -1, "button_3")
self.label_1 = wx.StaticText(self, -1, "Ciao")
self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("C:\\Documents and Settings\\Michele\\Documenti\\rosauto.jpg", wx.BITMAP_TYPE_ANY))
self.label_2 = wx.StaticText(self, -1, "label_2")
self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
self.__set_properties()
self.__do_layout()
# end wxGlade
def __set_properties(self):
# begin wxGlade: Fram1.__set_properties
self.SetTitle("frame_1")
# end wxGlade
def __do_layout(self):
# begin wxGlade: Fram1.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
grid_sizer_1 = wx.GridSizer(2, 2, 0, 0)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_1.Add(self.button_2, 0, 0, 0)
sizer_1.Add(self.button_3, 0, 0, 0)
sizer_1.Add(self.label_1, 0, 0, 0)
grid_sizer_1.Add(self.text_ctrl_1, 0, wx.SHAPED, 0)
grid_sizer_1.Add(self.bitmap_1, 0, 0, 0)
sizer_2.Add(self.label_2, 0, 0, 0)
sizer_2.Add(self.text_ctrl_2, 0, 0, 0)
grid_sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class Fram1
if __name__ == "__main__":
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
frame_1 = Fram1(None, -1, "")
app.SetTopWindow(frame_1)
frame_1.Show()
app.MainLoop()