谢谢

解决方案 »

  1.   

    forms中好多的published,到底  是哪一个呢,谢谢
    我还想问几个问题
      

  2.   

    //判断组件对象MyComponent是否包含属性sProperty
    //如果不包含则返回False,否则,返回True
    function TfrmJControls.HasProperty(MyComponent: TComponent;
      const sProperty: String): Boolean;
    var
      piPropInfo : PPropInfo;
    begin
      Result := False;  if MyComponent = nil then
        Exit;  if Length(Trim(sProperty)) = 0 then
        Exit;
      piPropInfo := GetPropInfo(MyComponent, sProperty, [tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod, tkWChar, tkLString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkDynArray]);  if piPropInfo = nil then
        Exit
      else
        Result := True;
    end;