This content has been marked as final. Show 6 replies
I don't think the built in label of the check box can accept different formatting but, you could not use the label of the check box, just leave it as an empty string and position a plain old label element right next to the check box (thus acting as the check boxes label).
Then, you can use the "htmlText" property of the label to use html type formatting tags mixed in with your text. Try pasting this somewhere into your app to see what I mean.
<mx:Label htmlText="Test some <b>text</b>" />
Remember that the < and > in your htmlText string can't be written as < and > in the mxml. You have to escape those characters with the html escape codes.
< = <
> = >
Hope that works for you and best of luck.
Thanks for that, I did consider this but I assumed this wouldn't be too great for accessibility, having no label on the checkbox, can anyone confirm?
I thin you missed Zach's point. You use a label and htmlText to create the checkbox label. Yyou just do not use the built-in label. The user will not know the difference
You could easily make an mxml composite component if you need to use this often.
Thanks ntsiii, I (think I) took his point but wanted to go further than that as of course if it looks the same, no one would know/care what code created it.
I'm curious whether anyone knows if this would impact on accessibility, specifically around screen readers.
Ah, I missed your point, which was regarding handicap accessibility.