Jump to content

how use accordion layout?


mehmet07

Recommended Posts

Hi.

 

Try this:

 

 

UniPanel1 -> ClientEvents -> UniEvents add beforeInit
function beforeInit(sender)
{
  sender.layout = 'accordion';
  sender.items = [{
            title: 'Panel 1',
            html: 'Panel 1 content'
        }, {
            title: 'Panel 2',
            html: 'Panel 2 content'
        }, {
            title: 'Panel 3',
            html: 'Panel 3 content'
        }];
}
Link to comment
Share on other sites

Ext.create('Ext.button.Cycle', {
    showText: true,
    prependText: 'View as ',
    renderTo: 'abcd',//html: '<div id="abcd"><div>'
    menu: {
        id: 'view-type-menu',
        items: [{
            text: 'text only',
            iconCls: 'view-text',
            checked: true
        },{
            text: 'HTML',
            iconCls: 'view-html'
        }]
    },
    changeHandler: function(cycleBtn, activeItem) {
        Ext.Msg.alert('Change View', activeItem.text);
    }
});

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...