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

Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Bug in DropDown child order

Nothing has been updated.  Assume it will be resolved in the final release.  Work around is to set the addChild order in reverse so the Drop downs are added last.

New Developer
Posts: 47
Registered: ‎10-22-2009
My Device: Not Specified

Re: Bug in DropDown child order

I am still not able to get this working with the work around.


I have 3 containers that use the entire width. The first container has a drop down. The second container has a labelbutton. The third has a List.


I want the dorpdown to appear above the rest. What should i do. I tried the following




 What am i doing wrong?


Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Bug in DropDown child order

hey shethab,


this bug is almost unavoidable if you are using containers since containers position your elements based on how and when you add its components via the addChild() method. The work around can only work in one of two ways: 1. if you arent using containers and add the child object (drop down) last and just reposition it using absolute x and y values 2. if you do use containers, put it in the last container. Even if you call the addChildAt() method last, you are still adding it to the first index (0) and it will show up under neath all other objects.

J. Rab (Blog) (Twitter)
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
New Member
Posts: 1
Registered: ‎05-02-2011
My Device: PlayBook
My Carrier: N/A

Re: Bug in DropDown child order

I was unable to find the official fix for this issue, so I am currently using the following workaround: Each time an input element is selected (DropDown, Picker, etc.), the display order for the entire UI element tree is reordered so that that element, and all its ancestral containers are on top. It seems to work.



/* This is a hack to bring the input objects to the front of the display because of a known PlayBook AIR bug. */
private function onInputOpen(event : Event) : void
  var open_input : DisplayObject;
  var open_input_parent : DisplayObjectContainer;

  open_input = event.target as DisplayObject;
  open_input_parent = open_input.parent;

 while (open_input != this) { open_input_parent.setChildIndex(open_input, open_input_parent.numChildren - 1);
open_input = open_input_parent as DisplayObject; open_input_parent = open_input_parent.parent; } }