0 Replies Latest reply on Sep 11, 2009 8:46 PM by ryadav

    how do set the combobox.dropdown direction according to the thumb position of scrollbar of scrollpane component


      I am adding comboxes that are created dynamically to a scrollPane component. Now my problem is when i am scrolling the scrollPane then last combobox dropdown  direction is up on clicking the combobox component . But others direction is down. So some dropdown are coming outside the scrollPane  component on click event .  I want dropdown direction should be adjusted according to the thumbposition of scrollbar of scrollPane component either up or down.

      Here is the code for you :

      /** my_sp is the scrollPane component refrence that is on stage & holder_mc is the movieClip in library**/

      my_sp.contentPath ="holder";

      my_sp.hScrollPolicy = false;


      objRoot  = my_sp.content;

      var xPos = 5;

      var yPos = 5;

      var count = 30; // number of comboxes that i want to show into the scrollPane component

      for(var i=1; i<count; i++){

      var myMc:MovieClip = objRoot.createEmptyMovieClip("myMovie"+i, i);

      myMc.createClassObject(ComboBox, "cb", 10);

      myMc.cb.setSize(200, 22);

      for(var k=0; k<10; k++){

      myMc.cb.addItem({data:k, label:"sample"+k});


      myMc._x = xPos;

      myMc._y = yPos;

      xPos += myMc._width +5;

      if(i%2 ==0 ){

                      yPos += myMc._height +5;

                      xPos =5;




      objRoot.base._height =objRoot._height+5;

      //my_sp.setStyle("borderStyle", "none");


      This is confusing me alot .Any help would be Greatly appreciated!