jQuery UI Widgets Forums Layouts DockPanel Refresh after browser resize possible?

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Refresh after browser resize possible? #1499

    ralf
    Member

    I want to fill the entire body with the container div. How can I achieve that the dock panel will be re-rendered after a resize of the browser?

    Refresh after browser resize possible? #1552

    Peter Stoev
    Keymaster

    Hi Ralf,

    You can achieve this by doing the following:

    1. Create the jqxDockPanel and set its size to the window’s size.

                var scrolloffset = 20;
    $("#jqxDockPanel").jqxDockPanel();
    $("#jqxDockPanel").width($(window).width() - scrolloffset);
    $("#jqxDockPanel").height($(window).height() - scrolloffset);
    $('#jqxDockPanel').jqxDockPanel('render');

    2. Subscribe to the window’s resize event and in the event handler, set the dock panel’s size again:

                $(window).resize(function () {
    $("#jqxDockPanel").width($(window).width() - scrolloffset);
    $("#jqxDockPanel").height($(window).height() - scrolloffset);
    $('#jqxDockPanel').jqxDockPanel('render');
    });

    Best Regards,
    Peter Stoev

    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.