I got a checkbox:
Button button = new Button("very long caption to the button");
button.setSwitchMode(true);
button.setWidth("150px");
As you can see I have a defined width for the component. The problem is that the caption needs more space than what I’m giving it. I was hoping that the caption would wrap to the next line as needed, but it actually just continues to the right, and the text is cut out after the 150px. If I click a few times on the checkbox, the component starts to grow so that the whole caption fits into the component, meaning that everything to the right side is pushed further away. This is really not good for my layout.
Is there a way to say to the component that the caption should wrap, or is this possibly a bug?