Skip to content

Commit ccc414a

Browse files
author
Metallicow
committed
Cleanup/Generator/Remove Unneeded
1 parent a470670 commit ccc414a

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

Diff for: GridBagSizer.1.py

+5-17
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99

1010
import wx
1111

12+
1213
class MyFrame(wx.Frame):
1314
def __init__(self, parent, ID, title):
14-
wx.Frame.__init__(self, parent, ID, title, wx.DefaultPosition)
15+
wx.Frame.__init__(self, parent, ID, title)
1516

16-
Buttons = []
17-
for i in range(6):
18-
Buttons.append(wx.Button(self,-1, "Button %i"%(i)))
17+
Buttons = [wx.Button(self, -1, "Button %i"%(i)) for i in range(6)]
1918

2019
sizer = wx.GridBagSizer(9, 9)
2120
sizer.Add(Buttons[0], (0, 0), wx.DefaultSpan, wx.ALL, 5)
@@ -34,23 +33,12 @@ def __init__(self, parent, ID, title):
3433

3534
class MyApp(wx.App):
3635
def OnInit(self):
37-
frame = MyFrame(None, -1, "wx.gridbagsizer.py")
36+
frame = MyFrame(None, -1, "wx.GridBagSizer Test 1")
3837
frame.Show(True)
3938
self.SetTopWindow(frame)
4039
return True
4140

41+
4242
if __name__ == "__main__":
4343
app = MyApp(0)
4444
app.MainLoop()
45-
46-
47-
48-
49-
50-
51-
52-
53-
54-
55-
56-

0 commit comments

Comments
 (0)