1. #1
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default Hiding "Center" Region

    Hiding "Center" Region


    Hi all,

    I have been facing a particular problem. I want a layout with 2 horizontal regions (using border layout), such that I can hide any one of them any time I want. They both should also be collapsible. I tried to do this with combinations of regions like Center-South, North-Center but I am not able to hide or collapse the Center region. I even tried the combination North-South, but then it does not render my toolbar properly.

    Anyone has any clues on how to do it??


    Thanx in advance

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    The center is the "fill" and doesn't collapse or hide. What are you trying to do? Maybe I can suggest an alternative.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    Can you do a north/south, while defining the center region in your layout? Then you could use a combination of YAHOO.ext.LayoutManager.getViewSize() and the collapsed, expanded, resized events on the north/south regions to set the size of those regions, keeping center at 0px.

  4. #4
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default




    You can have a look at the basic layout I want. Everything except the Page Header should be collapsible. I should also be able to hide them. I am using Border Layout.

    Actually our application has some old modules, which need to be displayed as is. And some newer ones which I have converted in a Grid and a corresponding Preview Pane Beneath it. However, both the kind of modules can be accessed from a common tree on the left. Now, when a user clicks on a new module, he should see a grid and a preview pane. No probs till now. But when he clicks on an old module, there should be no grid, and the entire content of the page should be displayed in the right area (Grid + Preview area) as is.

    So I thought I would make an Iframe in the Preview Pane and when an old module needs to be loaded, I will simply hide the Grid Area and then load the corresponding page in the Iframe. But I am not able to hide the Grid coz it is defined as "Center" area, and as Jack said, its a fill. So, it cant be collapsed or hidden. And I cannot make it "North" and make the Preview Pane "Center" coz the Preview Pane should be collapsible.

    Any solutions??

  5. #5
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default


    And yeah jbowman, I will try ur solution. I think it should work, but there must be a simpler solution.

  6. #6
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default


    I figured out an easier solution... I loaded 2 content panels in the center region, one with the grid and one with an empty Iframe.... then when I need to load the old modules, I just hide the south region and also the gridpanel.... otherwise I hide the Iframe panel and show the other two

    But I have a small problem now, I have a tab panel in the center region, and I am not able to make it go away.....

    I have uploaded a working copy of it at -
    http://www.e11helpdesk.com/helpdesk/admin/index.php
    user: admin
    pass: admin

    You might have to login twice. That is a small bug I am trying to fix. Right now its a very flimsy code by me... I am still learning

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,506
    Vote Rating
    54
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The browser sends what language you prefer in the HTTP request, theres no need for a selection.

  8. #8
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default


    Sorry for the inconvenience but the link I mentioned in the previous post had been reverted to the old app, and will remain that way for a few days..... I will post the link to the new app shortly...

  9. #9
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
    manugoel2003 is on a distinguished road

      0  

    Default


    ok the new app is up again on the same link, i.e.
    http://www.e11helpdesk.com/helpdesk/admin/index.php
    user: admin
    pass: admin

  10. #10
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    That looks sharp.

    You can lose the border on the top toolbar (and under the tab) with this css:

    .ylayout-panel-center .ytoolbar { border:0 none; }

    You can optionally use the panel's id as well (probably better but I didn't want to hunt for it).

Similar Threads

  1. Where are animate classes: "Actor" , "Animato
    By Young in forum Ext 2.x: Help & Discussion
    Replies: 13
    Last Post: 25 Jul 2007, 4:00 AM
  2. Simple "window" or region.
    By andrey.korolyov in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 5 Mar 2007, 9:25 AM
  3. Empty "north" region. But I still want the bar the
    By Animal in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 14 Nov 2006, 4:46 AM
  4. ContentPanel fitToFrame on "center" region
    By arnair in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 7 Nov 2006, 3:35 PM

Thread Participants: 4