<mx:button id="myButton" label="Submit Save"/>
we are using the " " to replace the '\n' in the tag.
--------------------------------------------------------------------------------
Update 2010-Jan-31
I would like to apologize that I had give wrong information to you, the information at above only workable in the dataGrid only. I had found the solution already. Please refer the below one.
I had found that flex 3.0 not able to do the multiline label in the button, the only way is extend the Class button.
below are the example and steps.
1. 1st you go to this site http://blogs.adobe.com/aharui/2007/04/multiline_buttons.html download the source code which are wrote by Alex’s Flex Closet.
- MultilineRadioButton.as
- multiLineRadioButton.mxml
- NoTruncationUITextField.as
3. Copy this three files into your new project likes below.
4. Open the multiLineRadioButton.mxml, in the Application tag you got this xmlns:comp="*" ,this means the Application is include the all files. If you want manage your files properly , you can put your files inside the folder , then the write as xmlns:comp="folderName.*" .
5. Actually this example source code is only for Radio button only. If you want to use in Button, you need to modify the function and class.
6. Now you open the file MultilineRadioButton.as , then at line 5 change the import mx.controls.RadioButton to mx.controls.Button , and at line 10 also change the extends RadioButton to extends Button class.
7. Then recompile again the source code , then you will see the button label in multi line.
8. I hope this example can help you.
No comments:
Post a Comment
Your comments is appreciate.