Skip navigation
Currently Being Moderated

List customization

Apr 3, 2012 7:10 AM

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

 
Replies
  • Currently Being Moderated
    Apr 4, 2012 11:24 PM   in reply to Vikram_S

    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();

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points