Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
I`m little newbie in vaadin, and i have small problem. I`m using horizontal layout, which contains 2 vertical layouts.( Please see attached file.) Left part is constant - always the same size. Problem is with right part. It contains Label with different text length. I would like to have both parts the same height. But there is problem - no matter what i`m doing, left part don`t want to be full size. Could anyone put here any example how to deal with it?
Put both in a horizontallayout, make left side 100% high, the right undefined height.
Thanks Thomas! I don`t know why, but it works.
Hi again :(
It`s almost fine, but now if right side has small hight, left become scrollable. Any idea how to fix it? And how to make right part adjustable to left side? If right side is smaller -then it should be left side size.
Well, you kind of have to select which side you wan't to be the deciding factor. The solution I gave above works, because it assumes the right side is higher than the left side and the left side just expands to be as big as the right.
The issue you have now is that they can't be 100% high, since that would mean both are 0 (the way Vaadin handles heights). You have to choose which side controls the height (I would make it the right one, as you have it now), and either add a minimum height in CSS or programmatically check if the content is small, and just give it a minimum height from code in that case (e.g. the message is less than a 1000 characters -> make the right side 150px high).
Is there any method to calculate numer of lines in label ? Because if I have breake line - it will be one character. And it will cause a problem to calculations.
To know where and how many times the label will wrap in the browser? No, not as far as I know.