I want to create pseudo table in spark TextArea: put some information in columns. I want to separate each column by adding tab between them (each "cell" from one column should has got the same width), and I have problem when I measure text width. I use label, and method mesure text, for example:
var label:Label = new Label();
var textMetrics:TextLineMetrics = label.measureText("some text with \t\t ");
var spaceWidth:int = textMetrics.width;
But this method doesn't work, especially when measured text contain TAB, returned value is incorrect.
Could anybody help me ?
Try using Spark RichEditableText which makes use of new Text Layout Framework (TLF) library.
It supports textFlow property which allows to use some HTML tags like <table>,<tr>,<td>.
Refer example at http://docs.huihoo.com/flex/4/spark/components/RichEditableText.html