This is a migrated thread and some comments may be shown as answers.

Automatic width and height on window.

1 Answer 3966 Views
Window
This is a migrated thread and some comments may be shown as answers.
100%
Top achievements
Rank 1
100% asked on 04 Mar 2014, 09:13 AM
It seems like on the page

http://docs.telerik.com/kendo-ui/api/web/window

the help section for the property width and height fails to tell how to setup a window to automatically resize to fit the contents.

How can that be done?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Mar 2014, 09:26 AM
Hello,

The Window's width and height properties are optional and if you do not set them, the widget will resize, according to its content, when an iframe is not used. The following demo shows this with regard to the height:

http://demos.telerik.com/kendo-ui/web/window/index.html

In some cases, it is recommended to use a width, because otherwise there is a risk for the Window to expand horizontally too much, if its contents can expand without limits.

When an iframe is used, automatic sizing does not work, because iframes do not resize, according to their child document. In this case you need to access the page inside the iframe, calculate its dimensions and apply them to the iframe.

http://docs.telerik.com/kendo-ui/getting-started/web/window/overview#using-iframes

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
100%
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or