Skip to main content
Vikram_S
Known Participant
April 3, 2012
Question

List customization

  • April 3, 2012
  • 1 reply
  • 2173 views

Hello,

I am creating simple bullet application where I want to start bullets from left edge of controller and Increase the gap between text and bullet. Is it possible in current version of TLF?

Please help.

Thanks,

Vikram

This topic has been closed for replies.

1 reply

Participating Frequently
April 5, 2012

Pasted a code scrap. Hope it will be helpful

....

 

                              var list:ListElement = new ListElement()

                              list.listStyleType = "decimal";

                              list.listStylePosition = "inside";

                              list.paddingLeft = "0";

 

                              var listMarkerFormat:ListMarkerFormat = new ListMarkerFormat();

                              var tabStops:Array = new Array();

                              var tabstop:TabStopFormat = new TabStopFormat();

                              tabstop.position = 50;

                              var tabstop2:TabStopFormat = new TabStopFormat();

                              tabstop2.position = 80;

                              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:ParagraphElement = new ParagraphElement();

                              var spanElement:SpanElement = new SpanElement();

                              spanElement.text = "Text starts here";

                              paragraphElement.addChild(spanElement);

                              item.addChild(paragraphElement);

                              list.addChild(item);

                              textFlow.addChild(list);

 

                              textFlow.flowComposer.updateAllControllers();