0 Replies Latest reply on Sep 25, 2009 5:23 AM by MichelleLee64

    Dropdown won't show (combobox, Menus)


      Hi Everyone,
      I have a problem that's getting on my nerve just a bit. I'm working on a EMR app
      and would like to display a PDF file in my Flex app. I'm using the HTML
      component to display it which works good so far, but my current version of the
      screen is using a PopUpMenuButton to allow selection of a PDF file. My issue is
      that once a selection is made and the PDF is loaded, if I try and select a
      option from the menu again, the dropdown won't display (or its getting covered
      up my the HTML control). I have 3 versions of this form and each have a simular
      problem. THe first version follows:
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
      layout="absolute" resize="resizeWindowContents()">

      <mx:ApplicationControlBar dock="true" fillAlphas="[1.0, 1.0]"
      fillColors="[#0E0847, #FFFFFF]">
      <mx:Label text="Select Form" fontWeight="bold" fontSize="12"
      <mx:ComboBox width="293" id="cmbForms" visible="true" change="changeEvt(event)"
      <mx:Object label="822 Individualized Treatment Plan" data="C:\PDF Docs\822
      Individualized Treatment Plan 6-29-2009 (Reader).pdf"/>
      <mx:Object label="822 Psychosocial" data="C:\PDF Docs\822 Psychosocial
      6-3-2009 (Reader).pdf"/>
      <mx:Object label="822 Utilization Review Form" data="C:\PDF Docs\822
      Utilization Review Form (Reader).pdf"/>
      <mx:Spacer width="100%"/>
      <mx:Button label="Back"/>
      <mx:Button label="Submit"/>
      <mx:HTML id="PDFViewer" width="100%" height="100%" resize="ResizeViewer()"
      x="0" y="0"/>

      Note: Scripts not shown
      In the version above when the form first loads (without a PDF file) the Dropdown
      on the combobox is visable. Once I select a option and a PDF is loaded the
      dropdown no longer displays in full, meaning it appears that the dropdown gets
      trapped inside the ApplicationControlBar.

      The last version follows:
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
      <mx:PopUpMenuButton y="0" label="PopUpMenuButton" width="100%" id="pb2"

      <mx:HTML id="PDFViewer" width="100%" height="100%" resize="ResizeViewer()"
      x="0" y="21"/>
      import mx.controls.Menu;
      import mx.events.MenuEvent;
      public var pdf:HTMLLoader;

      private function initData():void {

      private function ResizeViewer():void{
      if(pdf == null)
      pdf = new HTMLLoader;
      pdf.height = PDFViewer.height
      pdf.width = PDFViewer.width


      public var menuData:Array = [
      {label: "Individualized Treatment Plan", data: "0"},
      {label: "Psychosocial", data: "1"},
      {label: "Utilization Review Form", data: "2"}

      private function changeEvt(event:MenuEvent):void {
      var index:int;
      var filepath:String;
      index = event.currentTarget.label;
      switch (index) {
      case 0 :
      filepath = "C://PDF Docs//ITP.pdf";
      case 1 :
      filepath = "C://PDF Docs//Psych.pdf";
      case 2 :
      filepath = "C://PDF Docs//Util.pdf";
      var request:URLRequest = new URLRequest(filepath)
      pdf = new HTMLLoader();
      pdf.height = PDFViewer.height;
      pdf.width = PDFViewer.width;
      PDFViewer.addChildAt(pdf, 0);

      Question, How do I keep the dropdown on top of all other control on the form?
      Thanks for any help.