Multi Line Button in codename one

匆匆过客 提交于 2019-12-02 03:57:28

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!