Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Engaged ,
Jun 21, 2013 Jun 21, 2013

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

TOPICS
ActionScript
447
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 21, 2013 Jun 21, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines