Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    4
    Vote Rating
    0
    uipenguin is on a distinguished road

      0  

    Default GXT 3x: Adding a widget to BorderLayoutContainer center widget doesnt resize

    GXT 3x: Adding a widget to BorderLayoutContainer center widget doesnt resize


    Adding a widget to BorderLayoutContainer center widget doesn't resize widget to use full space available. when I resize browser window then widget expands to full space available.

    Is this a bug?

    public class LayoutTest extends Viewport{

    protected static LayoutTest _instance;

    public static String getName() {return "Layout Test";}
    public static Widget getInstance() {return _instance != null ? _instance : (_instance = new LayoutTest());}
    SimpleContainer contentViewContainer;


    public void onLoad() {
    BorderLayoutContainer borderLayout = new BorderLayoutContainer();
    SimpleContainer topNavP = new SimpleContainer();
    BorderLayoutData northLayoutData = new BorderLayoutData(100);
    northLayoutData.setCollapsible(false);
    northLayoutData.setSplit(false);

    TextButton tb = new TextButton("Add");
    tb.addSelectHandler(new SelectHandler(){
    @Override
    public void onSelect(SelectEvent event) {
    addView();
    }
    });


    topNavP.add(tb);
    borderLayout.setNorthWidget(topNavP, northLayoutData);

    contentViewContainer = new SimpleContainer();
    contentViewContainer.setPixelSize(800, 500);
    borderLayout.setCenterWidget(contentViewContainer);
    this.add(borderLayout);
    }

    private void addView(){
    VerticalLayoutContainer main = new VerticalLayoutContainer();
    TextButton tb = new TextButton("test");
    main.add(tb ,new VerticalLayoutData(1, 1));
    contentViewContainer.setWidget(main);
    }
    }

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    88
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    That is a very unusual way to set up your widget - waiting until onLoad means that the viewport has already been drawn, then you add something new but don't ask it to re-run layout. What happens if you finish your widget setup *before* you attach the viewport to the rootpanel?

    What are you doing in your entrypoint - this test sample doesn't implement entrypoint on its own.

    What version of GXT are you using?

    For future reference, please use the bug template when posting a bug - if you are just asking a question about GXT, consider posting in the Q&A forum.

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    4
    Vote Rating
    0
    uipenguin is on a distinguished road

      0  

    Default Adding a widget to BorderLayoutContainer center widget doesnt resize

    Adding a widget to BorderLayoutContainer center widget doesnt resize


    Adding a widget to BorderLayoutContainer center widget doesn't resize to full available space.
    When browser window is resized the widget takes full available space. Attached source code by attaching simple textbutton to BorderLayoutContainer center widget.
    Iis this a bug or what should be done for attached widget to take full space of BorderLayoutContainer center widget?

    thanks.
    Attached Files

  4. #4
    Sencha User
    Join Date
    Jun 2013
    Posts
    4
    Vote Rating
    0
    uipenguin is on a distinguished road

      0  

    Default


    GXT used is 3.0.1.

    in the entrypoint
    public void onModuleLoad() {
    RootLayoutPanel.get().clear();
    RootLayoutPanel.get().add(LayoutTest.getInstance());
    }

    I am setting BorderLayoutContainer as my main view view with center widget as details view. Details view can be changing based on user interaction and remove/add respective widgets to BorderLayoutContainer center widget

Thread Participants: 1

Tags for this Thread