代号为1的多行按钮 [英] Multi Line Button in codename one
问题描述
我必须将文本行显示为按钮. 行文本比行限制多,所以当我在按钮中显示它时,滚动文本而不是显示多行按钮.
请帮助使其变为多行.
您可以使用MultiButton,但必须自己进行换行.
或者,您可以使用支持多行的TextArea,如果不需要按下状态,则可以将其设置为false,然后使用setUIID("Button")
使其看起来像一个按钮.如果您需要更详细的说明,可以使用线索组件方法从文本区域构建按钮,以了解其工作原理,查看多按钮的源代码,并阅读用于在Container类中设置线索组件的文档. /p>
I have to display a text line as a button. The text of line is more then limit of line so when i display it in button it scroll the text rather then display multi line button.
Please help to make it multi line.
You can use MultiButton but you will have to do linebreaks yourself.
Alternatively you can use a TextArea which supports multi line and if you don't need the pressed state you can just set it to editable false and use setUIID("Button")
to make it look like a button. If you need something more elaborate you can use the lead component approach to build a button from a text area, to understand how that works look at the source code for multi button and read the documentation for setting the lead component in the Container class.
这篇关于代号为1的多行按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!