对于 TextArea,getMaxSize 真正返回什么?

发布于 12-04 10:12 字数 197 浏览 2 评论 0原文

TextArea 类有一个名为 getMaxSize() 的方法,该方法返回一个 int 值。我不明白它到底表达了什么?是宽度(列)还是高度(行)还是其他什么?

还有 setMaxSize(int maxSize) 方法。

那么使用 TextArea 时大小意味着什么?

The TextArea class has a method called getMaxSize() which returns an int value. I do not understand what does it really express ? Is it the width ( columns ) or the height ( rows ) or something else ?

There is also the setMaxSize(int maxSize) method.

So what does the size mean when working with TextArea ?

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

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

发布评论

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

评论(2

往日情怀2024-12-11 10:12:35

setMaxSize 用于设置TextArea 的最大大小。如果您传递 20 意味着 TextArea 上只允许使用 20 个字符。 getMaxSize 返回TextArea 的最大大小。这意味着它的返回值是 20。不要与列、行或其他东西混淆。有关详细信息,请参阅 TextArea javadoc。

setMaxSize for set the maximum size of the TextArea. If you pass 20 means only 20 characters allow on the TextArea. And getMaxSize returns the maximum size of TextArea. That means its return 20. Don't confuse with column or row or somethings else. For more info, look at TextArea javadoc.

彼岸花ソ最美的依靠2024-12-11 10:12:35

我认为 TextArea 中的 size 属性意味着您可以在此组件中放置的字符数。
我认为 TextField 也是如此。

I think that the size attribute in TextArea means the number of characters that you can be placed within this component.
I think the same is true for the TextField.

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