VerticalLayout horizontal scrollbar

Hello everyone !

I have a VerticalLayout of 800px width with a button inside. When i click on the button, a (huge) list of buttons is added under the initial button. A vertical scrollbar is also added to the VerticalLayout and a horizontal scrollbar too !
The addition of the vertical scrollbar (because of the list of buttons) acutally reduces the width of the VerticalLayout, that’s why a horizontal scrollbar is added.

Has anyone a solution to my issue ?

Thanks,
Kevin.

I have found the solution in an old post of Jouni :
post

Solution :
mainWindow.executeJavaScript(“vaadin.forceLayout()”);

Is that a good and enduring solution ?