Automatic width and height on window.

2 posts, 0 answers
  1. 100%
    100% avatar
    75 posts
    Member since:
    Apr 2013

    Posted 04 Mar 2014 Link to this post

    It seems like on the page

    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?
  2. Dimo
    Dimo avatar
    8406 posts

    Posted 05 Mar 2014 Link to this post


    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:

    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.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top