jQuery UI Widgets Forums Dialogs and Notifications Window Resize window programmatically

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 11 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Resize window programmatically #12106

    Antonio
    Member

    Hello guys,
    is it possible to resize programmatically the window widget?
    Seems that there’s no method that do it. I took a look at the code and I found “_resize[Left|Right|Top|Bottom]”.
    I can use some lines from this methods to accomplish the work, but I don’t want to use internal variables/methods.

    Do you have any suggestions? Thanks,

    Antonio

    Resize window programmatically #12113

    Dimitar
    Participant

    Hello Antonio,

    The way to programmatically resize the window is by modifying its width and height parameters, e.g.:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../scripts/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#window").jqxWindow({ width: 150, height: 100 });
    $("#button").click(function () {
    $("#window").jqxWindow({ width: 75, height: 50 });
    });
    });
    </script>
    </head>
    <body>
    <button id="button">
    Resize window</button>
    <div id="window">
    <div>
    Window</div>
    <div>
    Content</div>
    </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.