Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    vivanov is on a distinguished road

      0  

    Default HBoxLayout isn't resizng content if it palased in TableLayout

    HBoxLayout isn't resizng content if it palased in TableLayout


    Hello.
    I have LayoutContainer with HBoxLayout which placed into LayoutContainer with a TableLayout.
    When I resize browser window, TableLayout and HBoxLayout are resizing, but content of HBoxLayout does not do it.
    Code:
    package com.mySampleApplication.client;
    import com.extjs.gxt.ui.client.GXT;
    import com.extjs.gxt.ui.client.util.Margins;
    import com.extjs.gxt.ui.client.util.Theme;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.layout.*;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.TextBox;
    
    /**
     * Entry point classes define <code>onModuleLoad()</code>
     */
    public class MySampleApplication implements EntryPoint {
        private Viewport viewport;
        /**
         * This is the entry point method.
         */
        public void onModuleLoad() {
            GXT.setDefaultTheme(Theme.GRAY, true);
            viewport = new Viewport();
            viewport.setLayout(new FlowLayout());
            TableLayout tableLayout =  new TableLayout(2);
            tableLayout.setBorder(2);
            LayoutContainer panel = new LayoutContainer(tableLayout);
            TextBox textBox;
            HBoxLayout hBoxLayout;
            HBoxLayoutData hBoxLayoutData;
            TableData tableData;
            // Adding two TextBoxes to first row in to each Column
            textBox = new TextBox();
            textBox.setWidth("100%");
            tableData = new TableData("100%", "24px");
            panel.add(textBox, tableData);
            textBox = new TextBox();
            textBox.setWidth("100%");
            tableData = new TableData("100%", "24px");
            panel.add(textBox, tableData);
            // Creating HBoxLayout
            LayoutContainer hContainer = new LayoutContainer();
            hBoxLayout = new HBoxLayout();
            hBoxLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.MIDDLE);
            hContainer.setLayout(hBoxLayout);
            textBox = new TextBox();
            hBoxLayoutData = new HBoxLayoutData(new Margins(0, 5, 0, 5));
            hBoxLayoutData.setFlex(1);
            hContainer.add(textBox, hBoxLayoutData);
            textBox = new TextBox();
            hBoxLayoutData = new HBoxLayoutData(new Margins(0, 5, 0, 5));
            hBoxLayoutData.setFlex(2);
            hContainer.add(textBox, hBoxLayoutData);
            tableData = new TableData("Auto", "100%");
            tableData.setColspan(2);
            hContainer.setHeight("24");
            panel.add(hContainer, tableData);
            viewport.add(panel);
            RootPanel.get().add(viewport);
        }
    }

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    TableLayout is not resizing its children. This means that your container with your HBoxLayout is also not resized and so also does not resize its children.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    vivanov is on a distinguished road

      0  

    Default


    Thanks.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi