Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Onresize event in window control

    I'm using window control and I'm trying to do something on resizing the window, the problem is that i cannot find onresize event on window control, is there anything I can do to solve that problem

    please quick help, thanks

    #2
    you want window.resized() it's inherited from Canvas

    Comment


      #3
      Hallo, how would u solve this problem now? (I'm using the last version of smart gwt)
      I have a Layout containing a form and a table with a fix width.
      We want the window to show a scrollbar just when it's needed, for example on resize or when the user's screen is already smaller than the table.
      I tried on the layout.setOverflow(auto) but no success.
      Also Window.enableScrolling(true) is ignored

      Window.addResizeHandler
      @Override
      public void onResize(ResizeEvent event) {
      Window.enableScrolling(true);
      }
      });
      is also ignored (it doesn't even trigger the event)


      Thanks in advance for any hints


      Laura

      Comment


        #4
        Just setAutoSize(true) (remove your other attempts first).

        Comment


          #5
          Not a complete answer

          What if you want to use the window onResize to handle things like position on the screen?


          window.onresize = function() {
          slideInBar.setLeft(UnderHeaderLayout.getWidth()- slideInBar.getWidth());
          }

          Latest version on ie. This will set the position but the thread hangs and the other layout items do not get resized until after I touch a context menu because I assume a resize is called as it does not move the bar again, but resizes everything.
          Last edited by zrm625; 20 Jul 2012, 07:38.

          Comment

          Working...
          X