Adobe Flex Multiline CheckBox and RadioButton
This code was adapted from various ones I’ve seen around the interwebs, most notably spy6.blogspot.com/2008/09/flex-multiline-checkbox.html
However this one suffered from resizing issues( you had to explicitly set the width), and it did not work properly in the event that the font style changed on the text because there was another place that created the underlying textField which was not getting the mutliline handling executed, in commitProperties. I instead took a slightly different tack, to overload createInFontContext() which gets called by the Button superclass, and substitute a MultilineUITextField in the class factory instead. (Note createInFontContext() is probably newer than the original code from the blog post above, and wasn’t available to the original author of this hack.)
There is also a flex font styling component included that takes a target to assign the font styling. In that is the custom Font combo box that shows the actual fonts that I reworked from some other location on the webs…
Click thru for source view:
Adjust the slider to see it resize.