Hi again,

I found a solution.
Thank you for your time.

On 26.08.2013 13:37, Cristina Constantinescu wrote:
Hi,

Does anyone know how flash.text.TextField textWidth & textHeight are calculated?

Thanks,
Cristina

On 23.08.2013 16:31, Alexander Farber wrote:
Hello,

here a Multiline renderer which works for me
(yes I've noticed that 400px thing too...)
and also see my Stackoverflow findings at

http://stackoverflow.com/questions/15949378/multilined-itemrenderer-for-a-spark-components-list-with-test-case-and-screens

package renderers {
import spark.components.LabelItemRenderer;
  public class MultiLine extends LabelItemRenderer {
public static var IN_LOBBY:Boolean = false;
  public function MultiLine() {
super();
minHeight = Preferans.ROW_HEIGHT;
}
  override protected function createChildren():void {
super.createChildren();
labelDisplay.multiline = true;
labelDisplay.wordWrap = true;
}
  override public function set data(obj:Object):void {
super.data = obj;
  var label:String = obj.label as String;
  if (IN_LOBBY) {
var id:String = obj.id as String;
var key:String = (id ? id.substr(0, 2) : 'DE');
setStyle('color', Util.COLORS[key]);
} else {
var color:uint = (Util.isRed(label) ? 0xFF0000 : 0x000000);
setStyle('color', color);
}
}
}
}

Regards
Alex





Reply via email to