Azy
08.02.2007, 12:59
Написал ItemEditor:
Класс:
package ed
{
import mx.controls.TextArea;
import flash.events.Event;
import flash.system.fscommand;
public class EDescription extends TextArea
{
public function EDescription()
{
super();
this.addEventListener("change", this.changeEvent);
}
private function changeEvent(eventObject:Event):void
{
this.height = (this.textHeight <= 48) ? 48 : this.textHeight+6;
this.verticalScrollPosition=0;
}
}
}
Компонент:
<?xml version="1.0" encoding="utf-8"?>
<ed:EDescription xmlns:ed="ed.*" width="100%" wordWrap="true"/>
у DataGrid, в котором используется данный ItemEditor стоит свойство variableRowHeight=true;
Теоретически высота строки должна меняться вместе со свойством eDescription.height. Но нет. Из чего делаю вывод, что она устанавливается по свойству ItemRenderer.height. Как заставить строку изменять размер, вместе с размеров ItemEditor-a?
Класс:
package ed
{
import mx.controls.TextArea;
import flash.events.Event;
import flash.system.fscommand;
public class EDescription extends TextArea
{
public function EDescription()
{
super();
this.addEventListener("change", this.changeEvent);
}
private function changeEvent(eventObject:Event):void
{
this.height = (this.textHeight <= 48) ? 48 : this.textHeight+6;
this.verticalScrollPosition=0;
}
}
}
Компонент:
<?xml version="1.0" encoding="utf-8"?>
<ed:EDescription xmlns:ed="ed.*" width="100%" wordWrap="true"/>
у DataGrid, в котором используется данный ItemEditor стоит свойство variableRowHeight=true;
Теоретически высота строки должна меняться вместе со свойством eDescription.height. Но нет. Из чего делаю вывод, что она устанавливается по свойству ItemRenderer.height. Как заставить строку изменять размер, вместе с размеров ItemEditor-a?