0
當我有一個寬度爲200px的Form對象和寬度爲100%的FormItem子窗體時,FormItem在它包含時不會受其父寬度爲200px的限制一個非常大的孩子元素。爲什麼?我該如何阻止?Flex FormItems不兌現窗體寬度
<mx:Form width="200" backgroundColor="red">
<mx:FormItem label="Field:" width="100%" backgroundColor="yellow">
<!-- This component will force the FormItem to grow larger than the form... -->
<mx:ComboBox>
<mx:dataProvider>
<mx:ArrayCollection>
<mx:String>A very, very long string which will force the form to expand</mx:String>
</mx:ArrayCollection>
</mx:dataProvider>
</mx:ComboBox>
</mx:FormItem>
</mx:Form>
(實際上,我想寫一個版本的ComboBox這將大小本身正常的,但如果它太大其父只是捕捉到100%的寬度和截斷文本)