开发者

Accordion child controls are null until we open the panels

开发者 https://www.devze.com 2022-12-14 04:34 出处:网络
I am using Flex AS3, i have a accordian with two tabs each tab contains som开发者_JAVA百科e text boxes and i am trying to access these child controls from button event handler which resides outside th

I am using Flex AS3, i have a accordian with two tabs each tab contains som开发者_JAVA百科e text boxes and i am trying to access these child controls from button event handler which resides outside the accordian, Problem is these controls are null until i open the tabs of accordian.


Add this to the MXML of your accordion

creationPolicy="all"

It will then create everything at the beginning so those children will be there for you to reference.


You could try programatically opening and closing the accordion on something like creationComplete to force the creation of the components in the repeater. I would second avoiding repeaters. I have found with a little creativity you can do much better with basic lists and custom item renders. This gives you a lot more control over the creation of the child components.

0

精彩评论

暂无评论...
验证码 换一张
取 消