You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "JC Franco (JIRA)" <ji...@apache.org> on 2013/02/04 21:52:13 UTC
[jira] [Created] (FLEX-33381) Setting s:ComboBox#typicalItem
produces unnecessarily long width
JC Franco created FLEX-33381:
--------------------------------
Summary: Setting s:ComboBox#typicalItem produces unnecessarily long width
Key: FLEX-33381
URL: https://issues.apache.org/jira/browse/FLEX-33381
Project: Apache Flex
Issue Type: Bug
Components: Spark: ComboBox
Affects Versions: Apache Flex 4.9.0
Reporter: JC Franco
Setting s:ComboBox#typicalItem produces unnecessarily long width. By contrast, s:DropDownList behaves as expected when setting its typicalItem property.
Sample application:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minHeight="600"
minWidth="955">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function cb_creationCompleteHandler(event:FlexEvent):void
{
cb.textInput.typicalText = "Avenir Next Condensed Demi Bold Italic";
}
]]>
</fx:Script>
<s:Label text="DropDownList works as expected"/>
<s:DropDownList requireSelection="true" typicalItem="Avenir Next Condensed Demi Bold Italic">
<s:dataProvider>
<s:ArrayList>
<fx:String>Avenir Next Condensed Demi Bold Italic</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:DropDownList>
<s:Label text="ComboBox set to unnecesarily long width"/>
<s:ComboBox typicalItem="Avenir Next Condensed Demi Bold Italic">
<s:dataProvider>
<s:ArrayList>
<fx:String>Avenir Next Condensed Demi Bold Italic</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:ComboBox>
<s:Label text="Workaround: set ComboBox#textInput#tipicalText"/>
<s:ComboBox id="cb" creationComplete="cb_creationCompleteHandler(event)">
<s:dataProvider>
<s:ArrayList>
<fx:String>Avenir Next Condensed Demi Bold Italic</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:ComboBox>
</s:Application>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira