self.SetTitle("Python Calculater by CYG")
self.text_ctrl_1.SetMinSize((400, 50))
self.button_37.SetMinSize((100, 50))
self.button_38.SetMinSize((100, 50))
self.button_39.SetMinSize((100, 50))
self.button_40.SetMinSize((100, 50))
self.button_41.SetMinSize((100, 50))
self.button_42.SetMinSize((100, 50))
self.button_43.SetMinSize((100, 50))
self.button_44.SetMinSize((100, 50))
self.button_46.SetMinSize((100, 50))
self.button_45.SetMinSize((100, 50))
self.button_47.SetMinSize((100, 50))
self.button_48.SetMinSize((100, 50))
self.button_49.SetMinSize((100, 50))
self.button_50.SetMinSize((100, 50))
self.button_51.SetMinSize((100, 50))
self.button_52.SetMinSize((100, 50))
# end wxGlade
def __do_layout(self):
# begin wxGlade: MyFrame.__do_layout
sizer_2 = wx.BoxSizer(wx.VERTICAL)
sizer_3 = wx.BoxSizer(wx.VERTICAL)
grid_sizer_1 = wx.GridSizer(4, 4, 0, 0)
sizer_3.Add(self.text_ctrl_1, 0, 0, 0)
grid_sizer_1.Add(self.button_37, 0, 0, 0)
grid_sizer_1.Add(self.button_38, 0, 0, 0)
grid_sizer_1.Add(self.button_39, 0, 0, 0)
grid_sizer_1.Add(self.button_40, 0, 0, 0)
grid_sizer_1.Add(self.button_41, 0, 0, 0)
grid_sizer_1.Add(self.button_42, 0, 0, 0)
grid_sizer_1.Add(self.button_43, 0, 0, 0)
grid_sizer_1.Add(self.button_44, 0, 0, 0)
grid_sizer_1.Add(self.button_46, 0, 0, 0)
grid_sizer_1.Add(self.button_45, 0, 0, 0)
grid_sizer_1.Add(self.button_47, 0, 0, 0)
grid_sizer_1.Add(self.button_48, 0, 0, 0)
grid_sizer_1.Add(self.button_49, 0, 0, 0)
grid_sizer_1.Add(self.button_50, 0, 0, 0)
grid_sizer_1.Add(self.button_51, 0, 0, 0)
grid_sizer_1.Add(self.button_52, 0, 0, 0)
sizer_3.Add(grid_sizer_1, 1, wx.EXPAND, 0)
sizer_2.Add(sizer_3, 1, wx.EXPAND, 0)
self.SetSizer(sizer_2)
sizer_2.Fit(self)
self.Layout()
# end wxGlade
def bu1(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("1")
event.Skip()
def bu2(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("2")
event.Skip()
def bu3(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("3")
event.Skip()
def bu_plus(self, event):# wxGlade: MyFrame.event_handler
self.num1=self.text_ctrl_1.GetValue()
self.op="+"
self.text_ctrl_1.Clear()
event.Skip()
def bu4(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("4")
event.Skip()
def bu5(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("5")
event.Skip()
def bu6(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("6")
event.Skip()
def bu_min(self, event):# wxGlade: MyFrame.event_handler
self.num1=self.text_ctrl_1.GetValue()
self.op="-"
self.text_ctrl_1.Clear()
event.Skip()
def bu7(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("7")
event.Skip()
def bu8(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("8")
event.Skip()
def bu9(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("9")
event.Skip()
def bu_mul(self, event):# wxGlade: MyFrame.event_handler
self.num1=self.text_ctrl_1.GetValue()
self.op="x"
【计算器函数python 计算器函数功能怎么用】self.text_ctrl_1.Clear()
event.Skip()
def bu_clear(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.Clear()
event.Skip()
def bu0(self, event):# wxGlade: MyFrame.event_handler
self.text_ctrl_1.AppendText("0")
event.Skip()
def bu_chu(self, event):# wxGlade: MyFrame.event_handler
self.num1=self.text_ctrl_1.GetValue()
推荐阅读
- 武汉地铁需要手机直播吗,武汉地铁要刷健康码吗
- gis紧急拆解抢修方案,gis检修项目
- 怎么把pdf变成jpg格式,怎样把pdf变为jpg
- 安装cad2015时提示未安装net4.5,安装cad出现未安装net45
- mysql运算怎么算 mysql如何计算减法
- 9x鸿蒙系统公测,9x鸿蒙什么时候公测
- 土木工程毕业设计查重软件,土木毕业设计查重都查什么
- html5新增哪些语义标签,简述几种html5的常用标签和新增属性的含义
- js和go语言哪个快 js和其他语言区别