Re: [codenameone-discussions] How to create simple buttons with text wrap in BoxLayout.y ?

2021-06-08 Thread Shai Almog
I don't understand how you expect this to work? You have a button with long text that breaks lines. How do you expect this to be centered? If you explicitly line break with \n then there will be room for centering. Alternatively just use a bit of margin on the side to limit the space available

Re: [codenameone-discussions] How to create simple buttons with text wrap in BoxLayout.y ?

2021-06-08 Thread Javier Anton
https://www.codenameone.com/javadoc/com/codename1/ui/layouts/FlowLayout.html use the constructor with the orientation param and use CENTER On Tue, 8 Jun 2021 at 07:26, 'P5music' via CodenameOne Discussions < codenameone-discussions@googlegroups.com> wrote: > Thanks > I already tried with

Re: [codenameone-discussions] How to create simple buttons with text wrap in BoxLayout.y ?

2021-06-08 Thread 'P5music' via CodenameOne Discussions
Thanks I already tried with FlowLayout and the size is correct, but the button is on the left. So I added the FlowLayout container to a BorderLayout in the CENTER position, but the button still is on the left. Regards Il giorno martedì 8 giugno 2021 alle 00:00:58 UTC+2 javier...@gmail.com ha

Re: [codenameone-discussions] How to create simple buttons with text wrap in BoxLayout.y ?

2021-06-07 Thread Javier Anton
Option 1. Add them to a flowlayout container and add that container to the boxlayout.y Option 2. Override calcPreferredSize and set them to a custom width There are more ways On Mon, 7 Jun 2021, 21:12 'P5music' via CodenameOne Discussions, < codenameone-discussions@googlegroups.com> wrote: >

[codenameone-discussions] How to create simple buttons with text wrap in BoxLayout.y ?

2021-06-07 Thread 'P5music' via CodenameOne Discussions
There are only two Buttons with a round border over my CN1 app. I have an issue with the two buttons. I did not realize it before because they had no border and no bg. I put them in a BoxLayout.y() container along with other components. They are in different places of the vertical container but