First, thanks to Tracy for answering my question about the columns array of the 
DataGrid.  

My question relates to dragging popup-windows.


It's possible to drag a popup window outside the main application
window's bounds, and if the user happens to release the
mouse button at the wrong moment, the popup window can no longer be
grabbed.


My popup is defined in ActionScript like this:


public class MyPopupWindow extends TitleWindow   {  ... }

and is instantiated like this:

var popwin = new MyPopupWindow();
var isModal:Boolean=true;
PopUpManager.addPopUp(popwin, this, isModal);

How would I get a reference to the main application window's bounds? 
MyPopupWindow instances could be popped up from deep inside nested containers. 
Do I keep getting parents of parents until there are no more parents to get?


If I pass this rectangle to the MyPopupWindow constructor, can MyPopupWindow
use those values to prevent itself from being dropped outside those confines, 
in the
stopDragging() method that it inherits from Panel, and relocate itself?  What 
properties contain its its current location relative to the main window's 
bounds?


Or do I need to implement this in the class instance that invokes the 
PopUpManager.addPopUp method?


Thanks

Reply via email to