Multi Line Button in codename one

后端 未结 2 602
长情又很酷
长情又很酷 2021-01-25 14:02

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.

相关标签:
2条回答
  • 2021-01-25 14:17

    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.

    0 讨论(0)
  • 2021-01-25 14:28

    You can't do multi lines because button extands from label in lwuit. In this case you can use in ticker mode.

    0 讨论(0)
提交回复
热议问题