chetan,

can you give a simple code example that will display a icon or image when in
design time that does not display at run time?

On Sun, Feb 8, 2009 at 11:52 PM, cksachdev <[email protected]> wrote:

>   Have a look at UIComponentGlobals class. It has a property
> designTime(in v2)/designMode(in v3). In the constructor, add a
> listener for creationComplete and then in handler access designTime
> property, check if it is true, then do some processing.
>
> --
> chetan
> www.riageeks.com
>
> --- In [email protected] <flexcomponents%40yahoogroups.com>,
> "lytvynyuk" <lytvyn...@...>
> wrote:
>
> >
> > I have an issue to let my component look same in runtime and design
> > time.
> >
> > Component is container which looks like that:
> >
> > public class MyContainer extends Canvas
> > {
> > componentsEnvelop:LayoutContainer = new LayoutContainer();
> >
> > override public function initialize():void {
> > componentsEnvelop.percentHeight=100;
> > componentsEnvelop.percentWidth=100;
> >
> componentsEnvelop.setStyle("backgroundColor","#ffffff");
> > super.initialize();
> > }
> >
> > override public function
> > addChild(child:DisplayObject):DisplayObject {
> > return componentsEnvelop.addChild(child);
> > }
> >
> > private function
> > addChildSpecial(child:DisplayObject):DisplayObject {
> > return super.addChild(child);
> > }
> >
> > override public function
> > removeChild(child:DisplayObject):DisplayObject {
> > return componentsEnvelop.removeChild(child);
> > }
> >
> > private function doLayout():void {
> > this.addChildSpecial(componentsEnvelop);
> > this.addChildSpecial(titleBar);
> > titleBar.addChild(_label);
> > }
> >
> > override protected function createChildren():void
> > {
> > super.createChildren();
> > doLayout();
> > }
> > }
> >
> > in run time everything looks ok, but in design time in Flex Builder
> all
> > component I put inside my MyContainer displayed always beyond the
> > LayoutContainer and therefore invisible. How to handle that
> cituation,
> > what method should be override to intercept child add in design
> time?
> >
>
>  
>

Reply via email to