OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Label


For text to be centered, the width of the Label must be set. You can set it to percent value or points with percentWidth or width properties.

var _sln:Label = new Label();
_sln.text = _uofsModel.tempLessonTestResults.aUofS[i];
_sln.setStyle("textAlign", "center");
_sin.percentWidth = 100;
_bgs.addElement(_sln);

Using 100% width will center it in the parent container's x axis.