GXT号码字段自动计算

发布于 2024-09-24 19:00:25 字数 85 浏览 2 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一桥轻雨一伞开 2024-10-01 19:00:25

在两个字段上添加一个 keyListener,并在侦听器中覆盖 keyPress() 方法并在其中进行计算。

Add a keyListener on the two fields and in the listener override the keyPress() method and do you computations in it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文