jQuery UI Widgets › Forums › General Discussions › Dialogs and Notifications › Window › Change window size dynamically with option resizable false
This topic contains 4 replies, has 3 voices, and was last updated by Fire613 11 years, 10 months ago.
-
Author
-
Hi,
is it possible to dynamically/programmatically change the window size (window initialized with option resizable: false) ?
Method ‘resize’ doesnt work, although (.jqxWindow({width: int, height: int})) works but this is not what I need.
I know there is possibility to initialize window with option (height: ‘auto’) but this work only when window is reopened.For example I got window with textarea inside. At window open sizes are ok, but when I resize textarea I wanna to resize window too, is it possible?
Best Regars,
Gabriel.Hi Gabriel,
There is no method ‘resize’ in jqxWindow. It does not know about your content’s size so you will have to manually resize the window or through its width and height properties.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com…
resize MethodResizes the window. The ‘resizable’ property is expected to be set to “true”.
Code exampleInvoke the resize method.
$(‘#jqxWindow’).jqxWindow(‘resize’, 500, 500);
…So u suggest to get height of div with content on change and then set height property on window?
Hi gabrynio,
Sorry, my mistake. The ‘resize’ method internally sets the window’s width and height. jqxWindow with not auto-size itself depending on your content. The more correct approach is to set the width and height of the text area to a pecentage value and it will be automatically resized when you resize the window.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI ended up creating an autoSize function to accomplish this. See my Stack Overflow answer for the technique.
-
AuthorPosts
You must be logged in to reply to this topic.