开发者

flex popup that stays inside a container

开发者 https://www.devze.com 2023-02-17 08:38 出处:网络
I retrieved a fine component for drawing in flex. It uses some floating toolpalette like: toolBox = PopUpManager.createPopUp( this, ToolPalette ) as ToolPalette;

I retrieved a fine component for drawing in flex. It uses some floating toolpalette like:

toolBox = PopUpManager.createPopUp( this, ToolPalette ) as ToolPalette;

I tried to integrate that component into a new flex MXML component like a tileWindow: Works fine except that these tools palette are OUTSIDE the component.

Is there a way to constrain the toolBox created with PopupManager t开发者_运维百科o stay within its parent container ?

regards


I used createPopUp when the popup component was "titleWindow". But when I want a Canvas component added in the popup, I created a titleWindow and added the Canvas component as a child to the TitleWindow.

var titleWindow:TitleWindow;
titleWindow=new ResizableTitleWindow();
titleWindow.showCloseButton=true;
//Canvas Component
var toolPalette:ToolPalette=new ToolPalette();
// Add the Canvas component to the Titlewindow
titleWindow.addChild(toolPalette);              
PopUpManager.addPopUp(titleWindow, this, true);


Set the modal property when you call the createPopup method to true.

createPopUp(this, toolPalette, true, null)


By deffinition on adobes site no you can not constrain

createPopUp -- Creates a top-level window and places it above other windows in the z-order.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/managers/PopUpManager.html#addPopUp%28%29

Thats' not saying you couldn't try to create a mask of some sort

0

精彩评论

暂无评论...
验证码 换一张
取 消