Window & body resizing

July 4th, 2009
  • Hi all,

    I recently posted on this forum with plenty of questions related to getting an existing div into a window and this forum answered all of those questions.

    Now I have a niggle that I need to resize the window to restore its size each time the user logs back in. It seems that when I do window.getSize() I get the correct width and height, but when I do window.setSize() it doesn't restore the window size properly.

    Condor / Animal previous pointed out I needed to set the window.body size too - which I am now doing, but I have to deduct from the body width and height the windows margins / borders.

    Here is my current version (height value is not right here)


    window.body.setSize(w - 16,h-16);
    window.setSize(w, h);


    But I really want to refer to some constant value, or css value to offset the width and height. Any pointers would be appreciated.

    Thanks,
    Rob.


  • You might be able to use/borrow from this (http://extjs.com/forum/showthread.php?t=37822) plugin.


  • The Window class sizes its body. You should not have to do that.

    But see Element.getFrameWidth to find any padding size you must take into account.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Window & body resizing , Please add it free.

    Navigation

    Calendar

    Blog

    Categories

    Archives
    Search

    Links

    Feeds and Credits