Jump to content

how use accordion layout?


Recommended Posts



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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...