LWUIT:布局计算问题

发布于 2024-10-06 03:28:22 字数 325 浏览 1 评论 0原文

我有一个用 LWUIT 编写的相当大的应用程序。只有少数屏幕出现问题。

问题:

当页面加载时,一切看起来都很好。但是当您滚动时,您无法滚动到底部,并且当您单击列表时,它会选择您单击的位置下面的项目,而不是您单击的位置

但是,当您第二次单击选择列表时,一切都是美好的。另外,当弹出一个对话框时,单击它后,一切都很好。当我忘记调用 show() 或 repaint() 时,他不会绘制任何内容,但是当我尝试滚动时,他会显示()所有内容,并且他会正确计算它。

我真的很困惑这个问题。我现在正在寻找它很长一段时间。我很想在这里获得一些新的见解。

I have a rather large application written with LWUIT. With only a few screens that have the problem.

The problem:

When the page loads, everything looks fine. but when you scroll you can't scroll to the bottom, and when you click on a list it selects the item below where you clicked and not on where you clicked

However, when you click a select the list for a second time, all is fine. Also when a dialog pops up, after clicking it away, all is fine. And when I forget to call show() or repaint() he does not paint anything but when i try to scroll he shows() everything and he calculates it correctly.

I'm really puzzled about this problem. I'm searching on it for a long time now. And I would love to gain some new insights here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

半透明的墙 2024-10-13 03:28:22

经过5天的搜索,我终于找到了解决方案。将所有内容添加到表单后,您必须调用 form.show() 。而不是以前,就像我所做的那样。

大多数时候,这两种方式都可以正常工作。只是不总是如此。

After 5 days of searching on it, I finally found the solution. You have to call form.show() after you have added everything to your form. and not before, like I was doing.

Most of the time it works fine in both ways. Just not always.

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