[flexcoders] Re: flex 1.5 : how to lock Application during popup creation process ?
You can set the 3rd parameter of createPopUp() to true to create a modal popup, which will block input in everything in your app other than the popup window: var myPopUp = PopUpManager.createPopUp(parent, class, true, ...); You can then center that popup with respect to any component with centerPopUp(). For example, to center the popup in the application: myPopup.centerPopUp(parentApplication); Also, you can get a nice dimming effect for the app when a modal popup is displayed by using the following: new Color(myPopup.modalWindow).setRGB(0x33); --- In flexcoders@yahoogroups.com, Antoine Malpel <[EMAIL PROTECTED]> wrote: > > I use a lot of PopUpManager.createPopUp( ) in order to avoid > "background" interface's buttons etc.. this works well ! the use can > only interact with the PopUp-ed object... > > But I noticed that when a user click a second time on the same button > well... the popup is created two times ... > I tried to use, like shown on Flex Explorer Example : > > this is called just because calling createPopUp : > > function setBlockingCursor() { > // Create an "empty" UIObject popup that blocks user input > inputBlocker = popupWindow(UIObject); > CursorManager.setBusyCursor(); > } > > then with the popup-ed creationcomplete event : > > function removeBlockingCursor() { > // Remove our blocking popup > inputBlocker.deletePopUp(); > CursorManager.removeBusyCursor(); > } > > so I got the cursor but the user still can double click on the button ... > > Any go way to avoid this ? > > I also do not understand how I can 'place' the popUp as my application > is centered on the window browser ... so using .x = 0 from the popup it > will appear at left when someOtherCanvasInApplication.x = 0 but it > rights (relative to its parent) > -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: flex 1.5 : how to lock Application during popup creation process ?
You can create a global public variable Boolean that you set to true when the window is open and set to false when it closeed. var public isPoppedOpen : Boolean = false; Then when a user clicks the button, set it to true. Have logic in your window pop method that checks if this value is true, if so, then do nothing. Then in the close button of the PopUp Window, set the variable back to false; --- In flexcoders@yahoogroups.com, Antoine Malpel <[EMAIL PROTECTED]> wrote: > > I use a lot of PopUpManager.createPopUp( ) in order to avoid > "background" interface's buttons etc.. this works well ! the use can > only interact with the PopUp-ed object... > > But I noticed that when a user click a second time on the same button > well... the popup is created two times ... > I tried to use, like shown on Flex Explorer Example : > > this is called just because calling createPopUp : > > function setBlockingCursor() { > // Create an "empty" UIObject popup that blocks user input > inputBlocker = popupWindow(UIObject); > CursorManager.setBusyCursor(); > } > > then with the popup-ed creationcomplete event : > > function removeBlockingCursor() { > // Remove our blocking popup > inputBlocker.deletePopUp(); > CursorManager.removeBusyCursor(); > } > > so I got the cursor but the user still can double click on the button ... > > Any go way to avoid this ? > > I also do not understand how I can 'place' the popUp as my application > is centered on the window browser ... so using .x = 0 from the popup it > will appear at left when someOtherCanvasInApplication.x = 0 but it > rights (relative to its parent) > -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.