System.TypInfo.SetToString
Delphi
function SetToString(PropInfo: PPropInfo; Value: Integer; Brackets: Boolean): string;
function SetToString(TypeInfo: PTypeInfo; Value: Integer; Brackets: Boolean): string;
function SetToString(PropInfo: PPropInfo; Value: Pointer; Brackets: Boolean = False): string;
function SetToString(TypeInfo: PTypeInfo; Value: Pointer; Brackets: Boolean = False): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall SetToString(PPropInfo PropInfo, int Value, bool Brackets = false)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.TypInfo.pas System.TypInfo.hpp |
System.TypInfo | System.TypInfo |
説明
コンポーネントのプロパティの 1 つ以上の集合値を返します。
SetToString は、Delphi の RTTI(Run Time Type Information:実行時型情報)を利用して、コンポーネントの集合型のプロパティの 1 つ以上の値を取得します。
問い合わせたいプロパティを PropInfo レコードで定義します。GetPropInfo および GetPropList を使うと、このようなレコードを取得することができます。
Value には、このプロパティの値を選択するためのビット マスクを定義します。各ビットが 1 つの集合値に対応します。下位ビットが最初の集合値に対応します。選択された集合値をカンマ区切りの値の文字列にしたものが返されます。現在のプロパティの集合値は考慮されないことに注意してください。Value で選択された集合値のみが最終的な集合に含まれます。
必要に応じて Brackets を true に設定すると、IDE でプロパティを表示するときのように、返された文字列を角括弧で囲むことができます。
メモ: 指定したプロパティが存在しない、またはパブリッシュされたプロパティでない場合には、EPropertyError 例外が送出されます。