How to change modal transparency in Flex

I create a modal window with PopUpManager

_zoomImgPopUp = PopUpManager.createPopUp(this, Image, true) as Image; 

When the modal window is open, the whole background is gray and with blur. How to change the color, blur and transparency of the background.

I find this article http://mprami.wordpress.com/2008/04/22/alert_popup_modal_transparancy_color_blur_changes/

but this application is "mx". I need something with spark components.

UPD: Solved. It should be:

 _zoomImgPopUp.setStyle("modalTransparency", 0); _zoomImgPopUp.setStyle("modalTransparencyBlur", 0); PopUpManager.addPopUp(_zoomImgPopUp, this, true); 
+4
source share
1 answer

You have access to styles in the tag that affect Modal.

You should be able to do this:

 _zoomImgPopUp.setStyle("modalTransparency",1); _zoomImgPopUp.setStyle("modalTransparencyBlur",3); _zoomImgPopUp.setStyle("modalTransparencyColor", #ff0000); 

You can put this in your application / component / module, which refers to the popup.

 <fx:Style> @namespace s library://ns.adobe.com/flex/spark; @namespace mx library://ns.adobe.com/flex/halo; global { modal-transparency: 1; modal-transparency-blur: 2; modal-transparency-color: #ff0000; } </fx:Style> 
+7
source

Source: https://habr.com/ru/post/1381954/


All Articles