Label doesn't support multilne property. To use a multiline label
extend the label control .
Override the function createChildren(),
create a UITextField to display the label and set multiline property
to true.
Sample Code
/
*******************************************************************************************************/
package components
{
import flash.display.DisplayObject;
import flash.text.TextFieldAutoSize;
import mx.controls.Label;
import mx.core.UITextField;
/**
* The MultiLineLabel is a control that supports multiline property
and is extended
* from mx.controls.Label
*/
public class MultiLineLabel extends Label
{
override protected function createChildren():void
{
// Create a UITextField to display the label.
if (!textField)
{
textField=new UITextField();
textField.styleName=this;
addChild(DisplayObject(textField));
}
super.createChildren();
textField.multiline=true;
textField.wordWrap=true;
textField.autoSize=TextFieldAutoSize.LEFT;
}
}
}
/
*******************************************************************************************************/
On Mar 9, 7:36 pm, krishna chaitanya kambhampati
<[email protected]> wrote:
> There is not wrap text property for label
>
> *Use Text* control *or* use *truncateToFit *property for Label to display
> the label
>
> On Tue, Mar 9, 2010 at 5:29 PM, Iyer Anuradha <[email protected]>wrote:
>
>
>
>
>
> > in properties we have an option wraptext = true/false make it true.
>
> > i hope it will work
>
> > On Wed, Mar 3, 2010 at 2:22 PM, yogesh patel
> > <[email protected]>wrote:
>
> >> Hi,
> >> How to wrap text in lable?
>
> >> --
> >> Thanks & Regards,
> >> Yogesh Patel
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Flex India Community" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<flex_india%2bunsubscr...@googlegrou
> >> ps.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/flex_india?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<flex_india%2bunsubscr...@googlegrou
> > ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/flex_india?hl=en.
>
> --
> Thanks & Regards,
> K. Krishna Chaitanya
> ARIJASOFT - HYDwww.arijasoft.com
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.