form builder 中怎么实现公式运算
1个回答
展开全部
在你继承的类中写:
1
2
3
4
5
def btnFirstFuniction( self, event ):
num1=eval(self.m_textCtrl2.getValue())
num2=eval(self.m_textCtrl3.getValue())
ret=num1+num2
self.m_textCtrl6.setValue(str(ret))
下面的都差不多
1
2
3
4
5
6
7
8
def btnSeondFuniction( self, event ):
...
def btnThirdFuniction( self, event ):
...
def btnFourthFuniction( self, event ):
...
def btnFifithFuniction( self, event ):
1
2
3
4
5
def btnFirstFuniction( self, event ):
num1=eval(self.m_textCtrl2.getValue())
num2=eval(self.m_textCtrl3.getValue())
ret=num1+num2
self.m_textCtrl6.setValue(str(ret))
下面的都差不多
1
2
3
4
5
6
7
8
def btnSeondFuniction( self, event ):
...
def btnThirdFuniction( self, event ):
...
def btnFourthFuniction( self, event ):
...
def btnFifithFuniction( self, event ):
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询