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