Flex Force Uppercase in ComboBox -
i trying forcefulness uppercase in combobox
<s:combobox id="cbstocks" width="200" height="30" fontsize="16" dataprovider="{this.knownsymbols}" />
i tried setstyle approach suggested flexexamples without success
cbstocks.setstyle( "typographiccase", typographiccase.caps);and
cbstocks.textinput.setstyle( "typographiccase", typographiccase.caps);both throw exception rangeerror: property typographiccase value caps out of range
how forcefulness uppercase in combobox?
you can create custom formatter accomplish this:
public class capsformatter extends formatter { override public function format(value:object):string { homecoming value ? value.tostring().touppercase() : ""; } }
and utilize follows:
<fx:declarations> <f:capsformatter id="capsformatter"/> </fx:declarations> <s:combobox labelfunction="capsformatter.format"> <s:arraylist> <fx:string>hello</fx:string> <fx:string>world</fx:string> </s:arraylist> </s:combobox>
flex combobox uppercase
No comments:
Post a Comment