I am creating a corporate App. that displays notes on a project. I am using Grid , GridRow and GridItem for formatting. When I add the Text control and populate it, it won't wrap but simply truncates. Everything is in actionscript, using Flex-3. Here is an example of the code;
var newDescription_One_column:GridItem = new GridItem();
newDescription_One_column.percentWidth = 40;
var gridText_newDescription_One:Text = new Text();
gridText_newDescription_One.text = newDescriptionOne;
gridText_newDescription_One.truncateToFit = false;
gridText_newDescription_One.maxWidth = 360;
var newDescription_Two_column:GridItem = new GridItem();
newDescription_Two_column.percentWidth = 40;
var gridText_newDescription_Two:Text = new Text();
gridText_newDescription_Two.truncateToFit = false;
gridText_newDescription_Two.maxWidth = 360;
gridText_newDescription_Two.text = newDescriptionTwo;
Any help or suggestions are greatly appreciated
Thanks in advance
When you have ".maxWidth = 360", you instruct the Text component when it is being drawn not to have more than 360 pixels. If you remove it, your description wont appear truncated anymore.
Claude, THANK YOU!
Your answer helped me figure out what I needed to know. I have been fighting this for a while. The text would print on one line to the end of the screen and then truncate. I was trying to limit the width of the GridItem, which never worked correctly. If I set the maxwidth of the text control, the data truncates. If I set the width of the text control, it wraps...