[AS3] ComboBox Problem
I am trying to add a comboBox to a sprite as a Child. For some reason after adding the comboBox to the sprite, the height of the sprite gets bigger. I attached a copy of the code below.
Is this a bug? If so, any suggestions how I can get around this problem?
Thanks.
import fl.controls.ComboBox;
var tool1Container:Sprite = new Sprite();
tool1Container.graphics.beginFill(0xe5e6e7);
tool1Container.graphics.lineStyle(2, 0x929394);
tool1Container.graphics.drawRoundRect(0, 0, 220, 70, 0);
tool1Container.graphics.endFill();
tool1Container.x = 20;
tool1Container.y = 0;
addChild(tool1Container);
trace("tool1Container height before adding comboBox " + tool1Container.height);
var cbBox:ComboBox = new ComboBox();
cbBox.setSize(100,22);
cbBox.y = 33;
tool1Container.addChild(cbBox);
trace("tool1Container height after adding comboBox " + tool1Container.height);
//output
tool1Container height before adding comboBox 72
tool1Container height after adding comboBox 134
|