I've been working on an application (with ComboBoxes) that requires scaling the entire application based on screen resolution. I thought it would simply require changing the "scaleX" and "scaleY" properties of the top-level application, but discovered that the ComboBox dropdown doesn't appear to scale accordingly, as in the following example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicationComplete="init()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
private var options:ArrayCollection = new ArrayCollection([1,2,3,4]);
public function init():void {
this.scaleX = 5;
this.scaleY = 5;
}
]]>
</mx:Script>
<mx:ComboBox id="box" dataProvider="{this.options}"/>
</mx:Application>
The best I've been able to do with it is adding a "MouseEvent.MOUSE_DOWN" listener on the ComboBox and handling it like so:
var comboBox:ComboBox = event.currentTarget as ComboBox;
comboBox.dropdown.scaleX = 5; comboBox.dropdown.scaleY = 5;
which results in the dropdown appearing (sliding down) unscaled until it reaches it's extended length and stops at which point it scales up and remains at that scale until it is closed. I have also found that if you call "invalidateDisplayList()" on the comboBox or the dropdown, then it undoes the scaling, so it appears that whenever the updateDisplayList is called, the dropdown only applies it's parent ComboBox's scaling, and not the ComboBox's parent container's scaling.
I understand that, as a pop-up, the dropdown isn't in the Application's or ComboBox's displayList tree, which appears to be the root of the problem (no pun intended).
Anybody have any insights as to how to address this issue?
Thanks in advance!