HISPhilip Posted May 3, 2018 Share Posted May 3, 2018 Hi I want to use the multi layoutconfig function of the Accordian layout and tried using ExtEvents to implement it: http://docs.sencha.com/extjs/6.2.0/classic/Ext.layout.container.Accordion.html (Just add 'multi:true' within layout:{} and you can see behaviour in the jsfiddle example). This is my first time using ExtEvents and after trial and error the following will enable multiple panels to show: function afterlayout(sender, layout, eOpts) { layout.setLayout ({ multi : true }); } But all panels except top can expand but then collapse/expand button do not work anymore. I.E. the collapse/expand button only works once (first panel is already expanded by default so after a collapse can't be expanded). I may be using the wrong event and if there's an easier way to implement that would be even better. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 3, 2018 Share Posted May 3, 2018 Hi, Try this: function beforeInit(sender, config) { config.layout = { type: 'accordion', titleCollapse: false, animate: true, activeOnTop: true, multi: true } } Best regards, Quote Link to comment Share on other sites More sharing options...
HISPhilip Posted May 6, 2018 Author Share Posted May 6, 2018 Hi, I've tried but couldn't get it to work (can't find event beforeInit either). I also tried adding programatically via ClientEvents.ExtEvents.Add(''); I should note I'm trying to get it work on a UniPanel i.e. Ext.panel.panel. I've tried some other events as well not much success Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 7, 2018 Share Posted May 7, 2018 Hi, Which build are you using? Can you make a simple testcase?! Best regards, Quote Link to comment Share on other sites More sharing options...
HISPhilip Posted May 8, 2018 Author Share Posted May 8, 2018 Hi, I can't find event 'beforeInit' and I'm using one of the later beta versions because the latest release wasn't working very well with my project. uniGUI version: 1.10.0.1451 although I don't think this matters too much. I've been able to put the 'multi' setting on accordians on the ExtJS jsfiddles fine just having a hard time getting it to work from within delphi Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8, 2018 Share Posted May 8, 2018 Hi, Please, try to make a simple testcase Quote Link to comment Share on other sites More sharing options...
HISPhilip Posted May 8, 2018 Author Share Posted May 8, 2018 Sorry my bad I thought it had uploaded with my post, didnt realise there was an extra button to attach it. So the outer most panel has the accordian layout and I believe this is the one I should be assigning ExtEvents to (haven't put anything in it in the file) Project1.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8, 2018 Share Posted May 8, 2018 OK, 1. Remove: function afterlayout function afterlayout(sender, layout, eOpts) { //layout.config ({ // multi : true //}); } 2. Add: UniPanel1 -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.layout = { type: 'accordion', titleCollapse: false, animate: true, activeOnTop: true, multi: true } } Quote Link to comment Share on other sites More sharing options...
HISPhilip Posted May 8, 2018 Author Share Posted May 8, 2018 Okay thank you it works! Forgot about UniEvents (Not exactly sure what is the difference vs. ExtEvents) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.