How do I get a tab in afterContent (in ListMarkerFormat)?
I've made this test:
package {
import flash.display.Sprite;
import flashx.textLayout.formats.TextLayoutFormat;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.elements.ListElement;
import flashx.textLayout.elements.ListItemElement;
import flashx.textLayout.formats.ListMarkerFormat;
public class ListTest3 extends Sprite
{
public function ListTest3() {
var textFlow:TextFlow = new TextFlow();
var list:ListElement = new ListElement()
list.listStyleType = "upperRoman";
list.listStylePosition = "inside";
var listMarkerFormat = new ListMarkerFormat();
listMarkerFormat.beforeContent = "- ";
listMarkerFormat.afterContent = "\t";
var item:ListItemElement;
item = new ListItemElement();
item.listMarkerFormat = listMarkerFormat;
var paragraphElement = new ParagraphElement();
var spanElement = new SpanElement();
spanElement.text = "Text starts here";
paragraphElement.addChild(spanElement);
item.addChild(paragraphElement);
list.addChild(item);
textFlow.addChild(list);
var cs:Sprite = new Sprite();
cs.x = 30;
cs.y = 30;
textFlow.flowComposer.addController(new ContainerController(cs, 400, 200));
textFlow.flowComposer.updateAllControllers();
addChild(cs);
}
}
}
I works nicely, but when I try to add a tab after the numbering:
listMarkerFormat.afterContent = "\t";
I don't gat a tab and also the numbering the beforeContent gets lost...
I've also tried 	 and \u0009, but they also did not work...
Or is it a problem that I haven't defined tabStops in the ListMarkerFormat?
