Results 1 to 3 of 3

Thread: Slide panel with BorderLayout

  1. #1
    Ext User
    Join Date
    Dec 2009
    Posts
    2

    Default Slide panel with BorderLayout

    Hello,

    I have a page structured with a layout 'border'. My west panel is collapsible.
    By default, when I click on the titlebar when the west panel is collapsed, it slide out over the center panel.
    I wish the same working on the 'mouseover' event.

    Here, my west panel definition and my listener for the 'mouseover' event :
    Code:
    var west = new Ext.Panel({
        region: 'west',
        id: 'west-panel',
        title: 'West',
        split: true,
        width: 200,
        minSize: 175,
        maxSize: 400,
        collapsible: true,
        titleCollapse: true,
        margins: '0 0 0 5',
        layout: {
             type: 'accordion',
             animate: true
        },
        items: [{
             contentEl: 'west',
             title: 'Navigation',
             border: false,
             iconCls: 'nav'
        }, {
             title: 'Settings',
             html: '<p>Some settings in here.</p>',
             border: false,
             iconCls: 'settings'
        }]
    });
    Code:
    Ext.get("west-panel-xcollapsed").on('mouseover', function(){
        if (west.collapsed) {
             west.slideOut();
        }
    });
    This doesn't work. 'west.slideOut()' does anything.
    Anyone see how do it ?

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Code:
    var panel = Ext.getCmp('west-panel'),
        region = panel.ownerCt.layout[panel.region];
    region.getCollapsedEl().on('mouseenter', function(){
        if (!panel.collapsed) {
            region.slideOut();
        }
    });

  3. #3
    Ext User
    Join Date
    Dec 2009
    Posts
    2

    Default

    Oh ! thx a lot.

    It's exactly that I need .

Posting Permissions

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