Hi, Thank you very much for your reply, but after I compiled the new classes into an SWC and add it as Library in a Flex Project, it still does not render well. I can see that the label is rendered, but without the skin.
It do work when I change the class name to Button, the constructor name and the Button.createAccessibilityImplementation call in function initializeAccessibility(). And if I use 'MyButton', and provided I have a type selector for 'MyButton' in defaults.css, the 'MyButton' is well rendered in runtime but not in Flex Builder. If I ommit the type selector 'MyButton' in defaults.css, the skin is not rendered in runtime as well. This make me wonder how does the Flex Builder choose to render control skin in the design view? Thanks again Chee Seng --- In [email protected], "nathanbrown19" <[EMAIL PROTECTED]> wrote: > > Have you compiled your new class into an SWC? > > You need to do this and then include the SWC in project's library > paths before it is viewable in Flex Builder. > > Step by step: > > 1) Create a Flex Library project > 2) Put your new component in there > 3) Check that the component is checked of in the classes tab in the > Library Properties > 4) Create a new Flex Project > 5) In the properties include you ComponentLibrary.swc in the Library > Paths tab > 6) Now try using the component in your new project > > You have to do this before Flex Builder can understand your custom > components in design mode. It also enables things like custom icons > (in the components panel) to start working. > > Not sure why it worked when it was called Button in your new package!? > but hope the above helps. > > Nathan > > --- In [email protected], "Chua Chee Seng" <quai83@> > wrote: > > > > Hi all, > > > > With reference to previous topic of 'Custom Component Render Problem', > > I have successfully compile Button class source file under my own > > package name, and it renders well in Flex Builder and runs well too. > > However, if I try to rename the class name from 'Button' to > > 'MyButton', it does not render in Flex Builder anymore, and does not > > render in runtime too. I suspect it to be CSS problem, so I add a > > type selector for 'MyButton' (which same as original 'Button' type > > selector) in defaults.css which I used to compile my application > > project. After that, it renders well in runtime, but it still does > > not render in the Flex Builder. Is there a way to make the 'MyButton' > > component to render in the Flex Builder like others built-in components? > > > > Thanks in advance for any help. > > > > Thanks > > > > Best Regards, > > Chee Seng > > >
