PDA

View Full Version : Combobox Component And selectedIndex


brixel
07-17-2006, 05:16 PM
Hey guys,

Odd problem I've not seen before. I'm dynamically loading a combobox, then afterward, looping over the component and selecting an index for a default value.

This all works fine, but the problem is that the component doesn't display the label in the drop - if you click the arrow you will see the correct item selected.

Is this a bug or have I missed a step somewhere? Thanks.

brixel
07-17-2006, 06:38 PM
I need to add that the combobox is inside a clip that is dynamically generated, and that there are 2 or 3. Whats odd is that on all of them they are functioning correctly, but the labels are hidden, like masked.

Even if I attempt to change the drop down to another value I can no longer see the label values whent he drop down is closed to one line.

Any help with this would be appreciated.

brixel
07-17-2006, 06:55 PM
I still don't have a solution but from what I've been able to find from a few others this is a possible bug. It appears that there is some sort of masking issue when including a combo box inside a movie clip that gets dynamically attached. Only ever the last combobox remains "label" visible, the others are hidden.

stiakooo
07-18-2006, 09:52 AM
This problem occurs when the combobox is masked on the Stage.
If you want to mask the ComboBox you should set the mask with action script.
//container_mc is the instance name of the MovieClip where myComboBox exists
container_mc.myComboBox.setMask(mask_mc);

brixel
07-18-2006, 10:12 AM
Actually Im not using a mask. I found another obscure post which looks to be accurate - there is an internal movie clip to the combo box that is supposed tp swap it's own little mask with a text box inside itself, and that isn't happening. Looks to be a bug with the component itself - going to try and swap the two manually.

brixel
07-18-2006, 11:17 AM
It seems for some reason the component gets confused at times and forgets to swap it's internal cover of the label.

Manually swapping the depths is working about 95% of the time.

comboBoxInstance.text_mc.border_mc.swapDepths( comboBoxInstance.text_mc.label );

Kind of sad that we have to resort to this.

For additional information:

http://chattyfig.figleaf.com/pipermail/flashcoders/2003-October/091013.html