B
book523
Unregistered / Unconfirmed
GUEST, unregistred user!
一个简单函数,判断一个组件是否有某一属性
function HasPorperty(AComponent:TComponent;Aporperty:String):boolean;
var
PropInfoPropInfo;
begin
PropInfo:=getPropInfo(AComponent.ClassInfo,Aporperty);
Result:=PropInfo<>nil
end;
不过请注意,这个函数只检查公开的属性。对于非公开的属性,它们没有RT T I信息。
再次谢谢大家!