问题描述
我有一个自定义渲染器(继承自 AdvancedDataGridItemRenderer
),而且我重写 validateProperties
和使用的价值在宽度
属性,但我每次都让旧值!是不是 validateProperties
应该执行性能提交之后,(我打电话超)?这是我的code:
I have a custom renderer (inherits from AdvancedDataGridItemRenderer
), and I'm overriding validateProperties
and using the value of the width
property, but I'm getting the old value every time! Isn't validateProperties
supposed to execute after the properties were committed (I'm calling super)? Here's my code:
public override function validateProperties():void
{
super.validateProperties();
if ((AdvancedDataGrid(listData.owner).columns[listData.columnIndex].
showDataTips)&&(textWidth>width))
toolTip=listData.label;
else toolTip=null;
}
谢谢!
推荐答案
我解决了它。诀窍是使用 validateSize
为宽度
属性。 validateProperties
对于那些不属于任何其他团体对此有一个专门的 validateX
功能特性(如为 validateSize
, validateList
,等等)。
I solved it. The trick is to use validateSize
for the width
property. validateProperties
is for properties that don't belong to any of the other groups for which there's a dedicated validateX
function (such as validateSize
, validateList
, etc.).
这篇关于该物业仍具有validateProperties旧值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!