2 Replies Latest reply on Mar 25, 2009 1:01 PM by Newsgroup_User

    Show icon to my custom component in design mode

    The Bruder
      Hi Guys,

      Simple question, hope the solution will be also quick :-)

      I just made my perfect custom component and want to show icon on the flexbuilder design mode list and ALSO show my icon when i drag it in to the design mode stage.

      Does anyone know how to do it or have example it it?

        • 1. Re: Show icon to my custom component in design mode
          _Natasha_ Level 4
          You can find many examples in sources of sdk (%PROGRAM_FILES%\Adobe\Flex Builder 3\sdks\3.3.0\frameworks\projects\framework\src\mx\containers\Form.as)

          Answer is very simple: you should write meta information about your component like this
          [IconFile("myIcon.png")]
          In *.as file it's located before class code (you can see it in sources), in *.mxml in tag <mx:Metadata></mx:Metadata> as the first child.
          • 2. Re: Show icon to my custom component in design mode
            Level 7

            "The Bruder" <webforumsuser@macromedia.com> wrote in message
            news:gqctst$3ra$1@forums.macromedia.com...
            > Hi Guys,
            >
            > Simple question, hope the solution will be also quick :-)
            >
            > I just made my perfect custom component and want to show icon on the
            > flexbuilder design mode list and ALSO show my icon when i drag it in to
            > the
            > design mode stage.
            >
            > Does anyone know how to do it or have example it it?

            You have to compile the code as a swc.