Home > OS >  I want to align the text in the list box from right to left In AS3
I want to align the text in the list box from right to left In AS3

Time:07-03

I have created a list box, but I want to make the text written in it right to left, in the following code, in order to write the text in Arabic starting from right to left. Please help us solve this problem

stop();
import fl.controls.List;

var list:List = new List();
list.setSize(167,300);
list.move(788,165);
list.addItem({label:"Track 1"});
list.addItem({label:"Track 2"});
list.addItem({label:"Track 3"});
list.addItem({label:"Track 4"});
list.addItem({label:"Track 5"});
list.addItem({label:"Track 6"});

addChild(list);

CodePudding user response:

I've got the code that is used for alignment and other formatting of text in a cell. Thank you for cooperation in solving our problems.

var tf:TextFormat = new TextFormat();
tf.font = "Arial";
tf.color = 0x000000;
tf.size = 18;
tf.italic = true;
tf.bold = true;
tf.underline = true;
tf.align = "right";
list.setRendererStyle("textFormat", tf);
  • Related