Skip to content

Commit 1571eed

Browse files
authored
Update CR0601_wxcalculator.py
Fix crazy error when mixing wx.EXPAND with center
1 parent 2b27f3c commit 1571eed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chapter6_calculator/CR0601_wxcalculator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def create_ui(self):
2929
btn_sizer = wx.BoxSizer()
3030
for label in label_list:
3131
button = wx.Button(self, label=label)
32-
btn_sizer.Add(button, 1, wx.ALIGN_CENTER|wx.EXPAND, 0)
32+
btn_sizer.Add(button, 1, wx.EXPAND, 0)
3333
button.Bind(wx.EVT_BUTTON, self.update_equation)
34-
main_sizer.Add(btn_sizer, 1, wx.ALIGN_CENTER|wx.EXPAND)
34+
main_sizer.Add(btn_sizer, 1, wx.EXPAND)
3535

3636
equals_btn = wx.Button(self, label='=')
3737
equals_btn.Bind(wx.EVT_BUTTON, self.on_total)
@@ -100,4 +100,4 @@ def __init__(self):
100100
if __name__ == '__main__':
101101
app = wx.App(False)
102102
frame = CalcFrame()
103-
app.MainLoop()
103+
app.MainLoop()

0 commit comments

Comments
 (0)