I’m trying to build a collapsible panel in Flex 4. I thought I’d use s/thing like this:
<s:Panel
width="100%">
<s:controlBarContent>
<flexlib:WindowShade
width="100% />
</s:controlBarContent>
</s:Panel>
But that throws an error: Instantiation attempted on a non-constructor. I grabbed the flexlib zip for flex 4 but I’m still getting that error.
Is there another way to create a collapsible panel in a control bar?
Thank you for any tips!
You need to define the header renderer or header Class for the WindowShade component.
Looking at their code where this exception occurs
Exception is:
The code that throws exception is this
You need to define either a headerClass or a headerRenderer.
For testing purposes i used
and it works like a charm 🙂
Have fun and good luck.