How to control margin size between components in Java Studio Creator 2?
Hi,
a website layout with hard-coded coordinates (x,y) for component positions cannot adapt to the size of the user's browser window. Therefore, I use a kind of flow layout instead, consisting of components that are grouped in nested GridPanels (without any hard-coded coordinates).
This works pretty well, but the layout looks a little jammed, i.e. each text box or button is immediately followed by the next element (vertically). Therefore, I'd like to introduce some whitespace / increase the margins between the elements. However, all solutions I came up with are not really applicable:
1. Using the CSS Margin and / or Padding properties shifts the text of e.g. "Static Text" components by the selected number of pixels (which is good), but it does not shift the components further below (which is bad). Hence the text will frequently overlap with the text of the following component.
2. I can solve the overlap problem by increasing the height of the the component, but this has to be done separately for each component and fails if the number of words in a "Static Text" field is dynamic.
3. I did not find a way to specify in the CSS or elsewhere that a "Static Text" component should be 10 px + its "natural size" (i.e. height required to display all lines of a multi-line "Static Text"), which would also solve the problem.
Ideas and suggestions are highly appreciated!
Best regards,
Christoph

