In other MXML components, you can do stuff like use curly brackets to embed scripting, use “
”, and other stuff like that in their text and/or label attributes. Apparently mx:Buttons’ label attributes are so locked down that the normal suggestions for other components aren’t working. I could try just setting the labels in the main script of an MXML file or something, but that’s sloppy programming if it can be avoided (the labels’ values are going to be constant in this case). Is there not some way to put a line break in the attribute in MXML?
As for using “
”, that gave me a line break at least, but any text to the right of that sequence disappeared. This makes me think there may be a way to make that work, but so far, I haven’t found such a way.
Thanks!
EDIT: One thing though: I don’t want to do anything that depends on the particular canvas or panel or whatever that the button’s on to be actually created or anything like that. Latency, in that case, could cause the user to see the label change.
Alright, here’s basically the answer to this question:
Adobe Flex: Word Wrap in Button Label (thread)
https://stackoverflow.com/a/1654948/279112 (answer I’m referring to)
The only problem here is that, even though newlines and word-wrapping both work in his example, they don’t do that great of a job of working in conjunction with one another. It’s good enough for what I’m currently needing to do though, so I’ll improve on that later. Credit goes to danii and Alex for answering this initially, as well as to Christian Nunciato for providing this particular form of the answer.