how to keep dragged TitleWindow within Flex app boundary

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-03-07T20:31:19Z Indexed on 2010/04/07 19:33 UTC
Read the original article Hit count: 364

Filed under:
|
|
|

I am using PopupManager in FB4 to display a custom dialog.

    popwin = new TitleWindow(); 
    popwin.addElement(myCustomDialog);
    PopUpManager.addPopUp(popwin,this,false);
    PopUpManager.centerPopUp(popwin);

It's possible to drag the popped up TitleWindow and let go of it when its gray title bar lies outside the bounds of the Flex app rectangle, and then the popup cannot be grabbed again. It's also possible to drag the TitleWindow downwards so it becomes completely invisible below the bottom edge of the Flex app rectangle. When the Flex app bounds are less than the full browser window, and the user is working quickly, this chances of this happening increase. Is there a simple setting that will keep this from happening, or must the programmer intercept the behavior during the drag operation?

Thanks Tim

© Stack Overflow or respective owner

Related posts about flex

Related posts about popupwindow