Flex custom Component classification is placed in different folders on the component panel

Source: Internet
Author: User

Http://www.ccflash.com/Flex__2011_03__4269.html

A few days ago, someone asked, How do I customize a component group for flex? All self-written components are placed on the component panelCustomFolder.

I have been thinking about this problem over the past few days and finally found a solution!

Let's take a look at it first:

Here, I have put my custom components in two folders respectively. Is it the effect that everyone wants...

Step 1:
Create a new file and I name itDesign. xml

<? XML version = "1.0"?>
<Design version = "2">
<Categories>
<Category id = "miao1" label = "Miao container"/>
<Category id = "miao2" label = "Miao control"/>
</Categories>

<Components>
<Component name = "com. Miao. Container. ewindow" Category = "miao1"/>
<Component name = "com. Miao. Control. arrowtooltip" Category = "miao2"/>
<Component name = "com. Miao. Control. timeinput" Category = "miao2"/>
<Component name = "com. Miao. Control. timestepper" Category = "miao2"/>
</Components>
</Design>

<Category id = "miao1" label = "Miao container"/> indicates the folder category of the custom component. label indicates the name of the folder displayed on the component panel,
ID is referenced in <component name = "com. Miao. Container. ewindow" Category = "miao1"/>.
Component indicates the component to be displayed. Category corresponds to the preceding category. Name is the component path.
If you write many components in the library and only want to display a few external components, you can set them like this.

Step 2:
Put the design. xml file in the root directory of your library project (in the SRC folder, it cannot be put elsewhere ).

Step 3:
On the Properties Panel of the Library Project, find the resource tab and select the XML file you just selected.

All three parts have been completed.
Next, compile the Library Project, and go to the design view in the project that references this library project to see if your components have been classified in the component panel?
If it does not work, you can clear the library project and the project that references the library project and re-compile it.

You can also change the namespace!
Just like this

For details about how to change the namespace or what you don't understand, refer to here.
Http://help.adobe.com/en_US/Flex/4.0/flashbuilder_extensibility/DesignViewExtKitReadme.htm

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.