Results 1 to 3 of 3

Thread: Re-sizing children with no Viewport

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jan 2013
    Vote Rating

    Default Answered: Re-sizing children with no Viewport

    I am using GXT ver 2.2.5 to develop a app that will then get plugged in to a GWT application. The issue is that on the GWT end the component into which my app will get plugged in is a SimplePanel object (and I can't change that). I already learned that SimplePanel doesn't size its children. However one of the requirements that I've got is to develop a fluid UI that will scale across a number of screen sizes. As far as I understand I can't use Viewport because the SimplePanel into which my app will be plugged in is just a part of a bigger UI so introducing the Viewport breaks the existing UI. Is there any other way to dynamically resize children in a panel (i.e a grid)?

  2. If you can get any notification at all about the app resizing, you might be able to use that to calculate the new size for the Grid. For example (and probably overly simplfying, but hopefully it gets the idea across), you might know that whenever the browser window resizes, the grid should be 1/4 the size - 1/2 the height, and 1/2 the width. You might do something like this:

        Window.addResizeHandler(new ResizeHandler() {
          public void onResize(ResizeEvent event) {
            myGrid.setPixelSize(event.getWidth() / 2, event.getHeight() / 2);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts