Hi,

 

You could use the following approach from code inside of your panel. The code is not fully tested.

 

Harry

           

 

import mx.core.Application;

import flash.display.DisplayObjectContainer;

import mx.core.UIComponent;

 

private var normalParent:DisplayObjectContainer = null;

private var normalChildIndex:int;

 

private function makeModal():void {

      if( parent && !normalParent ) {

            normalParent = parent;

            normalChildIndex = parent.getChildIndex(this);

            parent.removeChild(this);

            for( var i:int = 0; Application.application.numChildren; i++) {

var obj:UIComponent = Application.application.getChildAt(i) as UIComponent;

if( obj ) obj.enabled = false;    

            }

            // Set position of the panel and remember old position

            Application.application.addChild(this);

}

}

private function makeNormal():void {

      if( normalParent ) {

            if( parent ) parent.removeChild(this);

            for( var i:int = 0; Application.application.numChildren; i++) {

var obj:UIComponent = Application.application.getChildAt(i) as UIComponent;

if( obj ) obj.enabled = true;

            }

normalParent.addChildAt(this, normalChildIndex);

// Set old position of the panel

normalParent = null;

normalChildIndex = 0;

      }

}

 

 

 


Von: [email protected] [mailto:[EMAIL PROTECTED] Im Auftrag von fzitters
Gesendet: Sonntag, 14. Mai 2006 22:47
An: [email protected]
Betreff: [flexcoders] How to make Panel modal (temporarily)

 

Hi,

in my app I have a panel that displays data. It should also be
possible to edit this data in-place (without a pop-up). So when the
user clicks 'Edit', the panel should become modal until the user
commits his changes ('Save') or discards them ('Cancel'). How can I
achieve this behaviour? (One idea I had was to modify the display
list, but I couldn't figure out what exactly I'd have to do.)

Thanks for your help!
fzitters







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to