gpt4 book ai didi

textbox - J2ME 文本框不可编辑

转载 作者:行者123 更新时间:2023-12-04 05:53:10 25 4
gpt4 key购买 nike

有没有办法让 j2me 中的 TextBox 不可编辑?

因为我想填充很多行但我不希望用户对其进行编辑。

最佳答案

对于 Textbox,这可以通过设置 TextField.UNEDITABLE 来实现约束(TextField 不是错字):

Indicates that editing is currently disallowed. When this flag is set, the implementation must prevent the user from changing the text contents of this object. The implementation should also provide a visual indication that the object's text cannot be edited. The intent of this flag is that this text object has the potential to be edited, and that there are circumstances where the application will clear this flag and allow the user to edit the contents.

The UNEDITABLE modifier can be combined with other input constraints by using the bit-wise OR operator (|).


UNEDITABLE修饰符可以在 TextBox 中设置构造函数,以及使用 setConstraints方法。如果您对此感兴趣,请参阅 TextBox API javadocs

关于textbox - J2ME 文本框不可编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9822550/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com