1 Reply Latest reply on May 3, 2010 1:38 PM by yu2009

    How to get rid of the Unwanted background shadow

    yu2009

      I created a popup (in DataGrid).  However, when th popup DataGrid displays, the backgroun becomes shadowed (see the image).  Anyone knows how to get rid of it?  Thanks.1.PNG

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox
      xmlns:mx  ="http://www.adobe.com/2006/mxml"
      borderColor  ="#6CC417"
      borderStyle  ="solid"
      dropShadowColor  ="#F9B7FF"
      dropShadowEnabled ="true"
      shadowDirection  ="right"
      shadowDistance  ="10"
      >
      <mx:Script>
      <![CDATA[
      import mx.containers.Grid;
      import mx.events.FlexMouseEvent;
      import mx.events.ListEvent;
      import mx.managers.PopUpManager;
      import com.esri.solutions.flexviewer.widgets.PopupForms.Popup_HomeState;


      private var popup:Popup_HomeState;
      private function itemClickEvent(event:ListEvent):void {
      var iIndex:int = event.rowIndex;
      var sItem:String = dg.dataProvider[iIndex].col1;
      showPopup(sItem);

          popup.addEventListener(Event.CLOSE, closePopUpWindow);
          popup.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, closePopUpWindow);
      }

      public function showPopup(s:String):void {

         if(s == "Home State" || s == "Unit State") {
      popup = PopUpManager.createPopUp(this, Popup_HomeState, true) as Popup_HomeState;
      PopUpManager.centerPopUp(popup);
         }      
      }

      private function closePopUpWindow(evt:Event):void {
          PopUpManager.removePopUp(popup);
      }

      ]]>
      </mx:Script>

      <mx:VBox>
           <mx:DataGrid id="dg" width="360" height="176"
            rowCount="8"  showHeaders="true"  itemClick="itemClickEvent(event)"  >
               <mx:columns>
                   <mx:DataGridColumn dataField="col1" width="120" headerText=""
      itemRenderer="com.esri.solutions.flexviewer.widgets.myForms.DGRenderers.ImageRenderer"  />
                   <mx:DataGridColumn dataField="col2" width="260" headerText=""/>
               </mx:columns>
           </mx:DataGrid>
      </mx:VBox>
      </mx:VBox>

       

      --------------------- Below is Popuup_HomeState.mxml

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:VBox

       

      xmlns:mx ="

      http://www.adobe.com/2006/mxml"

      borderColor ="

      #6CC417"

      borderStyle ="

      solid"

      dropShadowColor ="

      #F9B7FF"

      dropShadowEnabled ="

      true"

      shadowDirection ="

      right"

      shadowDistance ="

      10"

       

      >

      <mx:Script>

      <![CDATA[

      import

       

       

      mx.containers.Grid;

      import

       

       

      mx.events.FlexMouseEvent;

      import

       

       

      mx.events.ListEvent;

      import

       

       

      mx.managers.PopUpManager;

      import

       

       

      com.esri.solutions.flexviewer.widgets.PopupForms.Popup_HomeState;

       

        

      private

       

       

      var popup:Popup_HomeState;

       

      private

       

       

      function itemClickEvent(event:ListEvent):void {

       

      var iIndex:int = event.rowIndex;

       

      var sItem:String = dg.dataProvider[iIndex].col1;

      showPopup(sItem);

       

       

      // register event listeners for closing the popup window

       

      // when the popup window close button is clicked...

      popup.addEventListener(Event.CLOSE, closePopUpWindow);

       

      // or when an area outside the popup window is clicked...

      popup.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, closePopUpWindow);

      }

       

      public

       

       

      function showPopup(s:String):void {

       

       

      if(s == "Home State" || s == "Unit State") {

       

      //helpWindow = PopUpManager.createPopUp(this, Popup_HomeState, false);

      popup = PopUpManager.createPopUp(

      this, Popup_HomeState, true) as Popup_HomeState;

      PopUpManager.centerPopUp(popup);

      }

      }

       

      // method to close the popup window on close or mousedownoutside event

      private

       

       

      function closePopUpWindow(evt:Event):void {

      PopUpManager.removePopUp(popup);

      }

       

      ]]>

      </mx:Script>

       

       

      <mx:VBox>

       

      <mx:DataGrid id="dg" width="360" height="176"

      rowCount="

      8" showHeaders="true" itemClick="itemClickEvent(event)" >

       

      <mx:columns>

       

      <mx:DataGridColumn dataField="col1" width="120" headerText=""

      itemRenderer="

      com.esri.solutions.flexviewer.widgets.myForms.DGRenderers.ImageRenderer" />

       

      <mx:DataGridColumn dataField="col2" width="260" headerText=""/>

       

      </mx:columns>

       

      </mx:DataGrid>

       

      </mx:VBox>

       

      </mx:VBox>

        • 1. Re: Problem solved
          yu2009 Level 1

          Problem solved by change the

           

          popup = PopUpManager.createPopUp(this, Popup_HomeState, true) as Popup_HomeState;

           

          to

           

          popup = PopUpManager.createPopUp(this, Popup_HomeState, false) as Popup_HomeState;