Skip to main content
Chipleh
Inspiring
June 21, 2013
Question

Flash ComboBox component - getting data without using selectedItem...

  • June 21, 2013
  • 1 reply
  • 464 views

I'm using the Flash ComboBox component (not the Flex component) for a simple app, when the data is set by the data provider for the labels of the drop down list, I want to get that data and adjust the height of each list item based on the amount of text.

I know I can use [comboBox.dropdown.rowHeight = 40;] to adjust each list item's height, but I'm trying to figure out if I can assign a unique height to each list item.

From what I've found and seen this far, the fl.controls.ComboBox does not have a data property, and the only way to get the associated data is via the use of selectedIndex or selectedItem of the ComboBox.

Is there a way to get the data of list item without selecting it? Or is there a way to fake selectedIndex?(I'm not even sure what that means )

If you know if it's definitely not possible to get a list item's data without using selectedItem, would be so kind as to let me know, and kill my agony of pursuing this wild goosechase .

Thanks to the you,

~Chipleh

This topic has been closed for replies.

1 reply

Chipleh
ChiplehAuthor
Inspiring
June 21, 2013

Found part of my answer:

for(var i:int = 0;i<theDataProvider.length;i++)

{

        trace("----------------->label = " + theDataProvider.label);

        trace("----------------->data = " + theDataProvider.data);

        trace("aCb1.dropdown.getItemAt(i) = "+ aCb1.dropdown.getItemAt(i));              

}

Now I'm looking into setting the height of: aCb1.dropdown.getItemAt(i);

What objecy within the listItem would you target in order to set the individual height? 

Thanks for reading,

~Chipleh