1. #1
    Ext User
    Join Date
    Aug 2007
    Posts
    36
    Vote Rating
    0
    JKralicky is on a distinguished road

      0  

    Default Auto resize BorderLayout vertically based on content?

    Auto resize BorderLayout vertically based on content?


    Hi,

    Does anyone know if it's possible to auto resize a BorderLayout automatically (vertically) based on the size of the content? I'm not using document.body as the element, but rather a div inside the document.
    I have a west and a center panel. West is pretty static but Center is dynamic. It has a TabPanel where the content of the tabs can grow dynamically (w/ javascript).
    I can get the panel to scroll, but I would rather the user see everything.
    my container div is position: relative.
    I've set the height to a pixel value, and to a % value (together w/ a min-height) but the layout doesn't move.
    I've also enclosed the BorderLayout in an Ext.Resizable. I can resize with handles but I want it to grow vertically.
    Aside from using document.body, is there any way to make my BorderLayout grow vertically?

    Thanks so much!
    Joe

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,822
    Vote Rating
    608
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You could try making a call to

    Code:
    myLayout.layout();
    When a 'resize' event has occurred.

  3. #3
    Ext User
    Join Date
    Aug 2007
    Posts
    36
    Vote Rating
    0
    JKralicky is on a distinguished road

      0  

    Default


    Cool, thanks! That's a start.
    When I pull the resize handle on the Resizable, it redraws the insides of the BorderLayout.
    Now, how can I hook into the BorderLayout and find out if a scrollbar was generated and resize automatically based on the size of the inside panel? That would be ideal.
    Thanks for your help!
    Joe

    Quote Originally Posted by evant View Post
    You could try making a call to

    Code:
    myLayout.layout();
    When a 'resize' event has occurred.

  4. #4
    Ext User
    Join Date
    Aug 2007
    Posts
    36
    Vote Rating
    0
    JKralicky is on a distinguished road

      0  

    Default


    ...So basically I want the BorderLayout to function like it was attached to document.body, but not attached to the top of the document, since I have some other stuff up at the top. I'd like it to attach to the left/right of the document and grow w/ resizing the document, and expand vertically to accommodate my growing content.

    Anyone ever tried this?

    Thanks!
    Joe

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2007
    Posts
    31
    Vote Rating
    0
    pianoroy is on a distinguished road

      0  

    Default


    JKralicky, did you ever get this to work? I'm trying to do the same thing.

    Thanks!
    -Roy

  6. #6
    Ext User
    Join Date
    Oct 2007
    Posts
    20
    Vote Rating
    0
    joaosobrinho is on a distinguished road

      0  

    Default


    I have something like that.

    i use the setContentSize method.

    but in this case, when the BorderLayout grows, i know the exact size that grows...

  7. #7
    Ext GWT Premium Member
    Join Date
    May 2008
    Posts
    1
    Vote Rating
    0
    langfors is on a distinguished road

      0  

    Default


    I too am trying to have a border layout region size itself based on its content. However I cannot seem to get this to work. I have tried:

    panel.setSize(x,y);
    layout.layout();

    (where panel is the panel in the layout, and layout is the BorderLayout). I do this when I know the contents of the panel have changed shape, but this is not working. I can't find this setContentSize method you are describing. Where is that?

    Thanks

    Sean


    Quote Originally Posted by joaosobrinho View Post
    I have something like that.

    i use the setContentSize method.

    but in this case, when the BorderLayout grows, i know the exact size that grows...

  8. #8
    Ext User
    Join Date
    Nov 2009
    Posts
    3
    Vote Rating
    0
    amjedonline is on a distinguished road

      0  

    Default Does anyone have solution/workaround to this ?

    Does anyone have solution/workaround to this ?


    i want to dynamically resize the region in the BorderLayout, based on the contents of the region ?
    Is it possible at all ?

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