How to know which accordion panel is activated

How to know which accordion panel is activated

I have a panel with a leftpanel and a right panel and a toolbar on top, the leftpanel has two accordion (acc1,acc2), I have a botton on the top toolbar which needs to know which one is active, how do I achieve this ?

The parent panel with the accordion layout will have an items property which is a MixedCollection. That mixed collection has an each method which will iterate over the items so you can check properties on them. Each panel will have a collapsed property you can check for.