掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
TObjectList内の各オブジェクトのプロパティへアクセスするには? (ID:27939)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
TFooList = class(TObjectList) private function GetItems(Index: Integer): TFoo; procedure SetItems(Index: Integer; const Value: TFoo); public property Items[Index: Integer]: TFoo read GetItems write SetItems; end; function TFooList.GetItems(Index: Integer): TFoo; begin Result := TFoo(inherited Items[Index]); end; procedure TFooList.SetItems(Index: Integer; const Value: TFoo); begin Items[Index].Assign(Value); end; こういう事? override出来ない物でも、再定義しちゃえばいいので。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.