1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    70
    Vote Rating
    0
    CableDawg is on a distinguished road

      0  

    Default Need a BorderLayout with no center

    Need a BorderLayout with no center


    I am building an app that needs a permanent north and south and a collapsible east/west such that if East is expanded, West is collapsed and vice versa.

    Unfortunately, center is neither hidable or showable, and collapsing it generates errors.

    Any thoughts on how I can accomplish this?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Haven't tried this, but what if you make the center 1px wide?

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    70
    Vote Rating
    0
    CableDawg is on a distinguished road

      0  

    Default


    From what I can tell from the code, the center panel has a minimum width of 20. So I manually changed that to 1 and then scaled the east and west regions to 50/50 of the screen width.

    It looks OK, but then there are two splitbars on screen which looks sorta ugly. Plus I would have to attach some sort of listener to maintain the split between east and west so that center is never shown. Seems like a waste considering this functionality is already built in between center/west, center/east, et al.

    Plus the resizeTo method does not support the center region.

    It would be nice if I could get Center to act just like any other region. With a collapse button and the same styling applied to it when it is hidden.

    It looks do-able I guess, but seems like way more work than it should be.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    I think it's a good idea to make the center optional, so that all Regions can be collapsed, and have the others expand into place.

    You might want to look at the layout method in BorderLayout.js. That's the thing which sizes the various elements within the view size.

    If you can modify it, and come up with a solution which works with no center Region present, I think you could post it in Enhancement Requests.

Similar Threads

  1. Documentation center.
    By Dams in forum Sencha Cmd
    Replies: 6
    Last Post: 27 Aug 2008, 12:36 PM
  2. Creating Ajax tabs in center region of BorderLayout
    By booshan in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 4 Apr 2007, 8:21 PM
  3. [OPEN] BorderLayout: The text in the center panel gets clipped
    By rakshith in forum Ext 1.x: Bugs
    Replies: 7
    Last Post: 14 Dec 2006, 7:26 AM
  4. BorderLayout center collapsible?
    By robert in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 12 Dec 2006, 12:27 PM
  5. Documentation Center .2 is up!
    By jack.slocum in forum Ext 1.x: Help & Discussion
    Replies: 23
    Last Post: 22 Nov 2006, 8:29 AM

Thread Participants: 2