System.TypInfo.SetUnicodeStrProp

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

procedure SetUnicodeStrProp(Instance: TObject; const PropName: string; const Value: UnicodeString);
procedure SetUnicodeStrProp(Instance: TObject; PropInfo: PPropInfo; const Value: UnicodeString);

C++

extern DELPHI_PACKAGE void __fastcall SetUnicodeStrProp _DEPRECATED_ATTRIBUTE1("use SetStrProp") (System::TObject* Instance, const System::UnicodeString PropName, const System::UnicodeString Value)/* overload */;

プロパティ

種類 可視性 ソース ユニット
procedure
function
public
System.TypInfo.pas
System.TypInfo.hpp
System.TypInfo System.TypInfo

説明

警告: SetUnicodeStrProp は非推奨になっています。 SetStrProp を使用してください。

UnicodeString 型のコンポーネント プロパティの値を設定します。

SetUnicodeStrProp は、Delphi の RTTI(Run Time Type Information)を利用して、UnicodeString 型のコンポーネント プロパティの現在の値を設定します。

この関数の一方の形式では、プロパティは、PropInfo パラメータのデータを使用して検索されます。GetPropInfoGetPropList は、そのようなレコードを取得するために使用できます。

この関数のもう一方の形式では、プロパティの名前 PropName を明示的に与えます。

この関数のどちらの形式でも、新規のプロパティ値は Value で定義されます。

この関数の本来の価値は、プロパティの名前をハードコーディングせずに、コンポーネントのプロパティを設定できるようにすることです。これによって、実行時に大量のビジュアル コンポーネント処理を行うことができます。

型が未知のプロパティ値を設定するには、SetPropValue を使用します。通常、これは、別のプロパティから GetPropValue を使用する場合に使われます。

メモ:  指定したプロパティが存在しないか、または公開プロパティでない場合は、EPropertyError 例外が発生します。

関連項目