4 Replies Latest reply on Jul 23, 2014 12:33 PM by pixxxel schubser

    Expand select dropdownlist

    withoutdix Level 1

      I am trying to expand a open dropdownlist upon clicking on a statictext.

       

      var w = new Window ("dialog");
      
      var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
      
      var g0 = w.add("group {orientation: 'row', alignChildren: ['fill', 'fill'], margins: 0}");
      var lbCategoryCodes1 = g0.add("dropdownlist", undefined, ["test 1", "testerterg"]);
      
      b = w.add('button', undefined, "OK");
      
      ss1.addEventListener('mousedown', function(kev)
        {
          var event = ScriptUI.events.createEvent('MouseEvent');
          event.initMouseEvent('mousedown', true, true, w);
          lbCategoryCodes1.dispatchEvent(event);
        },false/*==bubble*/);
      
      w.show();
      
      
      
      
      


      Does not work.
      How do I?