lwuit java中html组件中的滚动条

发布于 2024-10-18 00:53:12 字数 170 浏览 6 评论 0原文

我想在 lwuit 中创建带有文本区域和文本框的聊天窗口。文本区域必须能够显示笑脸和彩色文本。我使用了 lwuit 的 HtmlComponent 并面临滚动条的问题。随着文本内容的大小增加,整个屏幕滚动,包括文本框。我只想滚动文本区域的内容。

怎么解决呢?

I want to create chat window with textarea and textbox in lwuit. Textarea must capable to show smiley and coloring text. I have used HtmlComponent of lwuit and facing problem in scrollbar. As text content grows in size, whole screen scroll including textbox. I want only content of textarea to be scrolled.

How to solve it?

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

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

发布评论

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

评论(1

梦里寻她 2024-10-25 00:53:12

好吧,您可以使用以下命令禁止滚动整个表单
Form.setScrollable(false)
然后,您只需使用相同的方法将 HTML 组件设置为可滚动“true”,最后将这两个组件(TextArea 和 HTMLComponent)设置为不同的 cosntraint(例如 BorderLayout.NORTH 中的 TextArea 和 BorderLayout.CENTER 中的 HTMLComponent)

well, you can forbid scrolling for the whole form using
Form.setScrollable(false).
Then you just set your HTMLcomponent scrollable "true" with the same method and finally put these two components (TextArea and HTMLComponent) to a different cosntraints (e.g. TextArea in BorderLayout.NORTH and HTMLComponent in BorderLayout.CENTER)

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