PDA

View Full Version : [AS2.0] Best way to use a different AccordionHeader?


DoubleE
06-05-2009, 01:30 PM
Hi,

I've been working on creating wrapping text version of the Button class (extending from SimpleButton) which I want to use in conjunction with an Accordion component (currently does not support wrapping text).
I've succesfully created my new TextWrappingSimpleButton class but need to know what the best way is to implement it in the Accordion.

I understand that the AccordionHeader extends the Button class and the Accordion uses instances of the AccordionHeader class for it's button / headers so logically (perhaps through my ignorance) it seems the way to get to my goal is to make a new AccordionHeader which extends TextWrappingSimpleButton and then make a new Accordion class which uses the new TextWrappingAccordionHeader class.

This seems really overkill though as I'll be duplicating alot of stuff, is there another way to do this?

Thanks,

DoubleE