Hi All,
I created a very simple UI components like Button and Combobox and set the width and height as following:
The theme is default which is reindeer
Button b = new Button(“I am wider button!”);
b.setWidth(“200”);
b.setHeight(“400”);
root.addComponent(b);
ComboBox l = new ComboBox();
l.setWidth(“100”);
l.setHeight(“300”);
root.addComponent(l);
Please see the attached image.
What is going on? Cant I create the wider components?
You can have wider Buttons and ComboBoxes, but not higher. The height of those components is fixed. If you need a taller button, use the NativeButton component, or provide a custom style for the button using CSS. ComboBox is similar, you need CSS to make it taller.
The above applies to Reindeer. With Runo, you can have taller Buttons, but ComboBoxes are still restricted to a fixed height.
The Chameleon theme allows both components to grow in both directions (and Base theme also).