Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default Windows and Layouts

    Windows and Layouts


    Trying to migrate an "old" GXT 2.2.5 application to the brand new gxt 3.0 I have encountered this problem.
    In my old application I have used many Window Forms with AbsoluteLayout for setting up their Labels and Fields in fixed positions.
    Since I have read in the Darrell Meyer Blog "Ext GWT 3.0 Developer Preview 2" that "... the layouts are now built into the container - it’s no longer required to set a layout manually ..." so I have tried to position (and resize) my objects directly into the Window.

    In the following sample I cannot resize the TextField to the values I want;
    Code:
    package test.client;
    
    
    import com.google.gwt.core.client.EntryPoint;
    import com.sencha.gxt.widget.core.client.Window;
    import com.sencha.gxt.widget.core.client.form.TextField;
    
    
    public class Main implements EntryPoint {
        public void onModuleLoad() {
            Window win = new Window();
            win.setPixelSize(800, 600);
            TextField tf = new TextField();
            tf.setPixelSize(100, 22);
            win.add(tf);
            tf.setPosition(10, 10);
            win.show();
        }
    }
    maybe any default layout still working ?
    Can someone tell me what is wrong in my code ?
    Every help will be appreciated.

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default Solution ?

    Solution ?


    I've found a simple workaround, here is the code:
    Code:
    package test.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.AbsolutePanel;
    import com.sencha.gxt.widget.core.client.Window;
    import com.sencha.gxt.widget.core.client.form.TextField;
    
    public class Main implements EntryPoint {
        public void onModuleLoad() {
            Window win = new Window();
            win.setPixelSize(800, 600);
            TextField tf = new TextField();
            tf.setPixelSize(100, 22);
            AbsolutePanel panel = new AbsolutePanel();
            panel.add(tf);
            win.add(panel);
            tf.setPosition(10, 10);
            win.show();
        }
    }
    Anyone can tell me if I'm heading to the right direction ?

  3. #3
    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


    Yes, that is the right direction. Window is a simplepanel and so its child will be sized according to the window. You need to add a layer in between, your AbsolutePanel now.

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Posts
    18
    Vote Rating
    0
    It_Barney is on a distinguished road

      0  

    Default


    Ok,
    Thanks a lot !

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