私はコンポーネントを開発しています。このコンポーネントには、TDataSourceプロパティとTSecondaryPathsListプロパティがあります。 TSecondaryPathsListは次のように宣言されています。Delphi - リストでプロパティエディタをドロップダウンしますか?
TSecondaryPathListItem = Class(TCollectionItem)
private
fDataField: string;
fPathPrefixParameter: String;
procedure SetDataField(Value: string);
procedure SetPathPrefixParameter(Value: String);
published
property DataField: string read fDataField write SetDataField;
property PathPrefixParameter: String read fPathPrefixParameter write SetPathPrefixParameter;
End;
TSecondaryPathsList = class(TOwnedCollection)
private
function GetItem(Index: Integer): TSecondaryPathListItem;
procedure SetItem(Index: Integer; Value: TSecondaryPathListItem);
public
function Add: TSecondaryPathListItem;
property Items[Index: Integer]: TSecondaryPathListItem read GetItem write SetItem; default;
end;
DataSourceプロパティを持たせたくありません。 TSecondaryPathListItem.DataFieldプロパティを実装して(プロパティエディタの)ドロップダウンリストにし、ComponentのDataSource.DataSetフィールドを表示するにはどうすればよいですか?