1. #1
    Ext User
    Join Date
    May 2008
    Posts
    7
    Vote Rating
    0
    sdever98 is on a distinguished road

      0  

    Default [FIXED] LayoutContainer resize bug beta 4

    [FIXED] LayoutContainer resize bug beta 4


    I found a bug with Beta 4:

    Please see the following post for more details:

    http://extjs.com/forum/showthread.ph...031#post180031



    I am trying to embedding a GXT container into a "slot" whose size is variable. It works if you resize the window larger but not if you resize it smaller. Below is the sample code Darrel provided. I used the Explore demo as my test. I created a new Viewport class does the same thing as the below DelayedTask which worked just fine in Beta 2/3.
    snippet from Darrell:
    There is no problem embedding a GXT container into a "slot" whose size is variable. I created some test code to demonstrate.
    I started with this HTML (note the nested div with relative positioning which is needed for BorderLayout):
    <table height="100%" width="100%" border="0"> <tr> <td height="25%" width="100%">top</td> </tr> <tr> <td height="50%" width="100%"> <div id="slot1" style="width:100%;height:100%;position:relative"></div> </td> </tr> <tr> <td height="25%" width="100%">bottom</td> </tr></table>
    There are 3 rows. The top and bottom are 25% tall, the middle is 50% tall. The goal is to add a GXT container to the center row and give it a BorderLayout.
    Here is the code I ended up with:
    public void onModuleLoad() { Window.enableScrolling(false); final LayoutContainer c = new LayoutContainer(); c.setSize("100%", "100%"); c.setLayout(new BorderLayout()); c.setBorders(true); ContentPanel center = new ContentPanel(); center.setHeading("Center"); BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER); centerData.setMargins(new Margins(5, 5, 5, 0)); c.add(center, centerData); ContentPanel west = new ContentPanel(); west.setHeading("West"); BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200); westData.setMargins(new Margins(5, 5, 5, 5)); c.add(west, westData); final DelayedTask task = new DelayedTask(new Listener<BaseEvent>() { public void handleEvent(BaseEvent be) { El td = c.el().getParent(); c.setSize(td.getWidth(), td.getHeight()); } }); Window.addWindowResizeListener(new WindowResizeListener() { public void onWindowResized(int width, int height) { task.delay(200); } }); RootPanel.get("slot1").add(c); }
    Thanks - Scott.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    See the linked post for my response.

Thread Participants: 1

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