ListMarkerFormat indent bug?
Hello,
I'm having trouble working with lists, tabs and indents.
Below the testcode I'm using:
/**
* @7111211 Stefan van Dinther
*/
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;
import flashx.textLayout.edit.EditManager;
import flashx.textLayout.formats.TabStopFormat;
public class ListTest3 extends Sprite
{
public function ListTest3() {
var textFlow:TextFlow = new TextFlow();
var list:ListElement = new ListElement()
list.listStyleType = "decimal";
list.listStylePosition = "inside";
list.paddingLeft = 0;
var listMarkerFormat = new ListMarkerFormat();
var tabStops = new Array();
var tabstop = new TabStopFormat();
tabstop.position = 70;
var tabstop2 = new TabStopFormat();
tabstop2.position = 180;
tabStops.push(tabstop);
tabStops.push(tabstop2);
listMarkerFormat.tabStops = tabStops;
listMarkerFormat.beforeContent = "- ";
listMarkerFormat.afterContent = String.fromCharCode(0x9);
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 = 0;
cs.y = 0;
textFlow.flowComposer.addController(new ContainerController(cs, 400, 200));
textFlow.flowComposer.updateAllControllers();
addChild(cs);
}
}
}
