Recently I have been working on a project where I have to dynamically make a bunch of forms based on Questions and Answers from a SQL database. This was going along nicely till I requested some real data that was to be used and the answers were much more verbose then I had anticipated causing the radio buttons to not display the text for the answer. What I needed was a multiline radion button.
There is no way to make a multi line button in flex out of the box which is a bit of a shame.
I started extending the button class to make it work how I needed while chatting with Rob Parkhill I got a few minutes into coding my own solution when Rob pointed me to this http://blogs.adobe.com/aharui/2007/04/multiline_buttons.html post by Alex Harui which did exactly what I needed.
The demo shows both the new Multiline Radio button and the same code creating the standard radio button.
Here is the structure for the demo:
The code:




0 comments:
Post a Comment