If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Trusted Contributor
PBDev
Posts: 108
Registered: ‎12-28-2010
My Device: Free PlayBook
My Carrier: Verizon

I'm trying to make a DropDown with columns


I'm using this code:

 

var dp:DropDown = new DropDown();
dp.width = 328;
dp.rowHeight = 40;
dp.rowCount = 6;
dp.setPosition(348, 150);
dp.addEventListener(Event.SELECT, Selected);
addChild(dp);
			
var dpp:Array = [];
dpp.push({label:"Name5\t\t 100"});
dpp.push({label:"Name25\t\t 150"});
dpp.push({label:"Name50\t\t 200"});
dpp.push({label:"Name75\t\t 300"});
dpp.push({label:"Name100\t\t 500"});
dpp.push({label:"Name200\t\t 100"});
			
dp.dataProvider = new DataProvider(dpp);
dp.selectedIndex = selectedName;

 

I trying to get the numbers to align with tabs. At first some of the numbers are aligned and some are not. If I go thru and select each item one at a time they align and stay like that. Is this a bug? Or am I doing something wrong?

Please use plain text.
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: I'm trying to make a DropDown with columns

Try this way:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Adding-a-viewable-2nd-column-to-L...

 

CellRenderers for dropdowns and for lists are the same, you have to make your own cell renderer to support your multicolumn fields.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.