Threaded View

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    33
    Vote Rating
    0
    Answers
    2
    alane is on a distinguished road

      0  

    Default Answered: Configure collapse control for panels

    Answered: Configure collapse control for panels


    I'm looking for a way to configure panels so that the collapse tool that appears with collapsible: true renders on the left hand side of the panel, before the title object.

    There's a hacky way suggested under collapseFirst on Ext.panel.Panel's documentation page, but this can adversely impact render time if you're rendering a lot of collapsible panels at the same time.

    Is there, or are there plans to develop, something like a collapseAlign configuration?

  2. ..ok. I do believe I got it looking at Ext.panel.Header.

    for anybody else looking into this, my solution was:

    Code:
    Ext.define('myapp.view.repeatingpanel', {
        extend: 'Ext.form.Panel',
        collapsible: true,
        header: {        
            listeners: {
              beforerender: function(header) {
                  var collapsetool = header.tools[0];
                  header.insert(0,collapsetool);
                  //this.log('before render',header);
              },
          }
        }

Thread Participants: 1

Tags for this Thread