Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 653495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:23:19+00:00 2026-05-13T22:23:19+00:00

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

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:23:20+00:00Added an answer on May 13, 2026 at 10:23 pm

    Hey, there isn’t a simple setting to prevent this from happening from my knowledge. All you need to do is watch it every time it moves and make sure it stays within certain bounds. You could then abstract that event handler into some Controller class if you’d like.

    Here’s a basic example:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        creationComplete="creationCompleteHandler()">
    
        <fx:Script>
            <![CDATA[
                import flash.geom.Rectangle;
                import mx.core.FlexGlobals;
                import mx.core.UIComponent;
                import mx.events.MoveEvent;
                import mx.managers.PopUpManager;
                import spark.components.TitleWindow;
    
                protected function creationCompleteHandler():void
                {
                    var window:TitleWindow = new TitleWindow();
                    PopUpManager.addPopUp(window, this, false);
                    PopUpManager.centerPopUp(window);
                    window.addEventListener(MoveEvent.MOVE, window_moveHandler);
                }
    
                protected function window_moveHandler(event:MoveEvent):void
                {
                    var window:UIComponent = event.currentTarget as UIComponent;
                    var application:UIComponent = FlexGlobals.topLevelApplication as UIComponent;
                    var bounds:Rectangle = new Rectangle(0, 0, application.width, application.height);
                    var windowBounds:Rectangle = window.getBounds(application);
                    var x:Number;
                    var y:Number;
                    if (windowBounds.left <= bounds.left)
                        x = bounds.left;
                    else if (windowBounds.right >= bounds.right)
                        x = bounds.right - window.width;
                    else
                        x = window.x;
                    if (windowBounds.top <= bounds.top)
                        y = bounds.top;
                    else if (windowBounds.bottom >= bounds.bottom)
                        y = bounds.bottom - window.height;
                    else
                        y = window.y;
                    window.move(x, y);
                }
    
            ]]>
        </fx:Script>
    
    </s:Application>
    

    Hope that helps,
    Lance

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I'm trying to open/close a TitleWindow using PopUpManager.addPopUp() and PopUpManager.removePopUp() while reusing the
I'm using TitleWindow with PopupManager. I programmatically add the children to my TitleWindow and
I'm using http://code.google.com/p/flex-iframe/ for showing wikicontent in a flex app. <?xml version=1.0?> <mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a
If I am using the PopUpManager to add a child, and I dispatch an
I'm using the PopUpManager to bring a bunch of event windows up. I want
I am new to flex framework. I have created an application using flex framework
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This
As the topic states, using a Rich Text Editor with a PopUpManager makes typing
using ... $this->getInvokeArg('bootstrap')->getOptions(); .. to retrieve my config settings from application.ini (using Zend Framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.