I've created a series of extended visual components for the project I'm currently working on so I've got a centralised location to adjust the appearance and methods of any component I put on the stage.
So for example, I have XPanel, which extends Panel, and I've overridden commitProperties to set a series of defaults such as borderThickness, etc. It seems to work fine when I run the application, but none of the defaults appear in Design View. The component can be dragged onto the stage etc, but the properties that appear in the Design View are the Flex defaults, not the new defaults I've set. Where or how exactly do I set the properties within the extended class to enable Design View to pick them up and display them? Here's an example, package xmx.comps { import mx.containers.Panel; import flash.util.trace; import mx.states.SetStyle; public class XPanel extends Panel { public function XPanel() { super(); var className:String="XPanel"; } override protected function commitProperties():void { layout="absolute"; setStyle("cornerRadius", 0); setStyle("headerHeight", 24); setStyle("borderThicknessBottom", 0); setStyle("borderThicknessLeft", 0); setStyle("borderThicknessRight", 0); setStyle("borderThicknessTop", 0); setStyle("borderThicknessTop", 0); setStyle("headerColors", [0xFFFFFF, 0xFFFFFF]); setStyle("highlightAlphas", [1,1]); setStyle("backgroundAlpha", 0.3); setStyle("backgroundColor", 0xFFFFFF); setStyle("dropShadowEnabled", true); setStyle("shadowDirection", "right"); setStyle("shadowDistance", 1); super.createChildren(); } } } and the MXML that instances it is as follows, <xmxComps:XPanel x="9" y="9" width="234" height="474" id="panelTest"> </xmxComps:XPanel> It appears as expected when the application is run, but it looks like a standard Flex panel in Design View. Is there a simple fix, or am I doing something horrendously incorrect? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/