Window autosizing

Hi! Is there any way to configure the window to fit the content that is in it?

If you do it with “template” and “autoheight”, you cannot add buttons at the bottom of the window.
If you try it with “scrollview”, the window does not respond to “maxHeight”.

https://snippet.webix.com/xsf2evow

Hey @lBeJIuk, as far as I can see the second window in the snippet seems to do the trick? I’m not quite sure, what do you mean by:

If you do it with “template” and “autoheight”, you cannot add buttons at the bottom of the window.

If you increase the maxHeight, it will fit more than a single row of buttons. The buttons won’t get resized to fit the maxHeight property if they overflow in any way.

@Dzmitry

I need to make a window that will change its size depending on the content. Besides, this window should be not less than minHeight/minWidth and not more than maxHeight/Maxwidth. The window should also contain the buttons.

Unfortunately, I’m not sure of a good way to achieve this, it doesn’t seem possible to meet all of these conditions at once. The best (and pretty much the only way to “autofit” the window) is to define autowidth for the components inside. That said, it only works well enough with just a single component in the window (i.e., a datatable)., having a layout inside of the window will present some issues, as you’ve already noticed.