header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
flexxx
Points:150
Posts:0
Answered

7/19/2010 7:16:43 AM

Title: Multi line radio button lable


Hi all
I am developing an polling app in flex which uses the radio button controls. The problem is when I am trying to set the option that uses multiline text (by hitting enter key in between the text) and then set this text as the radio button label,Only the first line of the text appear in the label and text of the succeeding lines lost i.e does not appear in the label of radio button.
Any Solution?



1
bob_senior
Points: 1300
Posts:0
7/19/2010 9:13:52 AM



checkbox does not support multiline text you should extend the checkbox and add a multiline textbox for label to achieve this functionality.

2
flexxx
Points: 150
Posts:0
7/19/2010 9:40:31 PM



Hi
Can you present any example for adding a multiline textbox for labels or can elaborate it in some more details.

3
Inder
Points: 2880
Posts:0
7/20/2010 12:11:34 AM



check my answer in the below question link to see how you can implement the multiline textbox in a component like checkbox. In this link I have added multiline textbox to extended button, similarly you can add it to checkbox by extending the checkbox class.

http://askmeflash.com/qdetail/538/wrap-text

4
flexxx
Points: 150
Posts:0
7/20/2010 2:12:17 AM



Hi Inder
I am using the method you have suggested but now the problem is that I am getting an exception on the following line of code:
addChild(DisplayObject(wrappedTextField));

the exception is
addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.


I am using flex 4 and also the addElement is not available in the suggestion list.

5
flexxx
Points: 150
Posts:0
7/20/2010 4:48:49 AM



I am extending radio button control.

6
Inder
Points: 2880
Posts:0
Accepted Answer
7/21/2010 11:30:18 AM



to make your flex spark radio button control with multiline text see this article

http://blog.flexexamples.com/2010/04/10/creating-a-multiline-spark-radiobutton-control-in-flex-4/#more-2721

I hope this solves your issue


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 2+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions