Results 1 to 6 of 6

Thread: close west, expand east

  1. #1

    Default close west, expand east

    Hi,

    I have an application with a viewport with center, east, north and west regions. On initial application load, I create all of the regions, and make sure that east remain collapsed with the "collapsed" property.
    The West region have a treepanel. When user clicks on a leaf, i want collapse west region and expand East region, and (if possible) vice-versa.
    Can anyone point me how can i achieve this? Thanks in advance.

  2. #2

  3. #3

    Default

    Animal,

    We, the learning people, fill honored when we can catch your attention, you are what we plan be in future. But this answer is a no-answer. Do you really think that people post questions without search until they can?
    Asking for help comes with a lot of shame: How they know and i am stupid and dont know?
    I'm trying to do both methods at same time. I know how to use each one separatelly.
    Thanks for your attention, ans sorry about my english.

  4. #4

    Default

    found by myself:

    Code:
                var w = Ext.getCmp('west-panel');
                var e = Ext.getCmp('east-panel');
                e.on('expand', function(){
                      w.collapse();
                });    
                w.on('expand', function(){
                      e.collapse();
                });    
                w.on('collapse', function(){
                      e.expand();
                });    
                e.on('collapse', function(){
                      w.expand();
                });

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Well done. So, the answer wasn't quite so much of a "non-answer" then was it?

    It actually got you to look at your problem, read the docs, and find out what to do so you learned something from the process instead of being given code to copy/paste. Good result I'd say.

  6. #6

    Default

    You are correct. Sorry about my impatience.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •