Select to view content in your preferred language

Setting popup window alpha

1248
6
10-26-2011 09:03 PM
BenKane
Regular Contributor
I am trying to modify the popup window to have a fully transparent box and only show the image specified in the popup config file and the close button.
I have tried to insert alpha="0" and contentBackgroundAlpha="0" but have only succeeded in making the image itself disappear, not the popup window.

Where do I need to look to set the transparency/color for the popup window.  I know it is inherited from the main config but I want to keep the colors as they are for the rest of the viewer.  Ideally I would only be implementing this transparent popup window for one popup, but keep other popups as already formatted, if that's possible.
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Ben,

   In the PopUpRendererSkin.mxml you would have to change the commitProperties to:

            override protected function commitProperties():void
            {
                super.commitProperties();
                var iws:InfoWindowSkin = hostComponent.parent.parent.parent as InfoWindowSkin;
                var iw:InfoWindow = iws.hostComponent as InfoWindow;
                iw.setStyle("backgroundAlpha", 0);
                iw.setStyle("borderAlpha", 0);
0 Kudos
BenKane
Regular Contributor
Thanks Robert, that worked great.

Is it possible to use more than one PopUpRendererSkin, with their own popup config xml files, in one viewer application?  Or would that require implementing widgets (eg Identify) with different skins for each?
0 Kudos
DavidCaussin
Deactivated User
Hi,

Strange, when i add this i receive an error that InfoWindow is not found or not a compile time constant....

any idea??

thanks
0 Kudos
BenKane
Regular Contributor
I had the same issue but this fixed it. Add this import:
  import com.esri.ags.components.supportClasses.InfoWindow;





Hi, 

Strange, when i add this i receive an error that InfoWindow is not found or not a compile time constant.... 

any idea?? 

thanks
0 Kudos
DavidCaussin
Deactivated User
Thaks a lot that was it
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

  The thing you need to remember is that "is not found or not a compile time constant" == missing import!

As imports are normally at the beginning of the file many time developers will not remember to post those with the snippet of code they are sharing or they are assuming that if you are asking for code that you are aware that you need to ensure you have the proper imports.
0 Kudos