Error in creating Accordion in Flex, flexaccordion
1. Error description
2. Error cause
<Mx: Accordion width = "100%" height = "100%"> <s: NavigatorContent label = "student" width = "100%" height = "100%"> Student </s: navigatorContent> <s: NavigatorContent label = "" width = "100%" height = "100%"> instructor </s: NavigatorContent> </mx: Accordion>
NavigatorContent inserts text
3. Solution
Text is represented by a label
<S: Label text = "instructor"/>
In flex, only the first VBOX of the accordion control can be used to obtain children. The following code is empty? TestAccordionmxml
It should be the order of generation. If you do not click the column vbox2, The LinkButton in it is not generated, so there is no object.
Private function onCreationComplete (): void
{
This. add. addEventListener (MouseEvent. CLICK, addHandler );
//
}
Private function addHandler (event: MouseEvent): void
{
Alert. show ("add clicked ");
This. view. addEventListener (MouseEvent. CLICK, viewHandler );
}
Private function viewHandler (event: MouseEvent): void
{
Alert. show ("view clicked ");
}
In this way, we can see the reason. Therefore, you need to add your listener to <mx: VBox id = "vbox2">.
Switch pages using Accordion in FLEX
What do you mean?
Didn't selectedIndex be used?