Skip navigation
Currently Being Moderated

ComboBox rowCount and dropDownWidth

May 9, 2010 11:50 AM

Where have they gone ? I dont see them in spark combobox. Do I have to fiddle with skins to get to these properties ??

 
Replies
  • Currently Being Moderated
    May 9, 2010 7:27 PM   in reply to toft

    hi,

     

    you can get the width and height from

     

      myCombo.dropDown.width;

      myCombo.dropDown.height;

     

    not sure about the rowcount, maybe from the layout of the dropdown you can get rowheight and use that. I'll have a look and see what the go is.

     

    David.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2011 4:12 AM   in reply to David_F57

    myCombo.dropDown is null always.. pls guide me..

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2011 4:20 AM   in reply to toft

    I think the dropDown is null when the ComboBox is closed, because then there is no dropDown list.

    So you may be able listen the "open" event and set the dropDown dimensions ?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2013 8:00 PM   in reply to toft

    Love it or hate it, Spark has its quirks.

     

    public function DropDownList()

                        {

                                  super();

                      addEventListener(DropDownEvent.OPEN,onOpen);

     

     

                        }

     

                        protected function onOpen(event:DropDownEvent):void

                        {

                                  if(this.dropdownWidth)

                                  {

                                            this.dropDown.width= this.dropdownWidth;

                                  }

                        }

     

      public var dropdownWidth:int;

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points