When I add a ComboBox component into a Sprite, the height of the container is larger than it should.
Here's what I mean:
import fl.controls.ComboBox;
//add combo box inside a container sprite
var combo:ComboBox = new ComboBox();
var container:Sprite = new Sprite();
addChild(container);
container.addChild(combo);
//draw the outline of the container sprite
container.graphics.lineStyle(1,0x009900);
container.graphics.drawRect(0,0,container.width,container.height);
//I don't get this:
trace(combo.height);//outputs 22
trace(container.height);//outputs 101
Note: You will need the ComboBox component in your Library. I'm using Flash CS3 for this.
If I invalidate/redraw, like this:
combo.invalidate(InvalidationType.ALL,true);
combo.drawNow();
the height changes from 101 to 104.
Any solutions ?
UPDATE: I've overwritten the configUI method in a ComboBox subclass, but the measurements are correct all the time. Why does the container height change to 100 ?