1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    264
    Vote Rating
    0
    Stephan123 is on a distinguished road

      0  

    Default Fire event when region is open

    Fire event when region is open


    Hello !

    I have test an closable region.
    When i open a closable region i need an reaction.
    I have test with several variants.
    But i becam no reaction.
    For example:

    Code:
    new Ext.Viewport({
            layout: 'border',
            items: [{
                xtype: 'panel',
                title: 'Center',
                region: 'center'
            },{
                xtype: 'form',
                region: 'east',
                id: 'east',
                width: 300,
                title: 'form',
                collapsible: true,
                collapsed: true,
                listeners:{
                    show: function() {
                        alert('show');
                    }
                },
                items: [{
                    fieldLabel: 'Feld 1',
                    xtype: 'textfield'
                },{
                    fieldLabel: 'Feld 2',
                    xtype: 'textfield'
                }]
            }]    
        });
    Your sincerly

    Stephan

  2. #2
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    use afterlayout event from viewport
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

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

      0  

    Default


    Its the expand event on that region that you must listen for.

    To be notified when it expands(!)

    Could you not look at the docs and figure this out?

  4. #4
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    Hi Animal,

    i also consulted the docs, and Region says:
    Public Events
    This class has no public events.

    but in source i see
    Code:
         p.on({
                    beforecollapse: this.beforeCollapse,
                    collapse: this.onCollapse,
                    beforeexpand: this.beforeExpand,
                    expand: this.onExpand,
                    hide: this.onHide,
                    show: this.onShow,
                    scope: this
                });
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

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

      0  

    Default


    Ah well, the docs are not perfect yet. They are constantly evolving...

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

      0  

    Default


    In fact the config and events are on Panel The region must be a Panel to be collapsible.

    This is not really good. The BorderLayout classes need a complete rewrite.

  7. #7
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    that's what i saw too. Yes, that's totally confusing ...
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

Thread Participants: 2