Error in creating Accordion in Flex, flexaccordion

Source: Internet
Author: User

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?
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.