Yahoo ASTRA Flash Components の Tree でテキストが途中できれてしまうのを回避する
デフォルトだと、なぜか一定の長さでテキストの表示がきれてしまう。
それを切れないようにする。
\com\yahoo\astra\fl\controls\treeClasses\TreeCellRenderer.as を編集
編集前(417行目〜)
if (label.length > 0) {
textField.visible = true;
//var textWidth:Number = Math.max(0, width - textFieldX - textPadding*2);
//textField.width = textWidth;
textField.height = textField.textHeight + 4;
textField.x = textFieldX;
textField.y = Math.round((height-textField.height)>>1);
} else {
textField.visible = false;
}
編集後(変更箇所:419、420行目)
if (label.length > 0) {
textField.visible = true;
var textWidth:Number = Math.max(0, width - textFieldX - textPadding*2);
textField.width = textWidth;
textField.height = textField.textHeight + 4;
textField.x = textFieldX;
textField.y = Math.round((height-textField.height)>>1);
} else {
textField.visible = false;
}
要するにコメントアウトを2つはずす。
なぜデフォルトでコメントアウトしてあるのだろう・・・謎だ。