GXT号码字段自动计算
我有一个 GXT 表格,其中包含三个数字字段:体重、身高和 BMI。我想要做的是在用户填写体重和身高字段后自动计算体重指数。我有什么想法可以实现这一目标吗?
I have a form in GXT with three number fields: weight, height and BMI. What I want to do is to calculate BMI automatically after filling weight and height fields by the user. Any ideas how I can achieve that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在两个字段上添加一个 keyListener,并在侦听器中覆盖 keyPress() 方法并在其中进行计算。
Add a keyListener on the two fields and in the listener override the keyPress() method and do you computations in it.