Доброго времени. Не могу понять что не так.
unit UDocOper;
interface
uses
messages,dialogs,SysUtils, adodb,db, windows, forms,Classes, Controls, cxControls, cxPC;
type
TopParametr = class (TCollectionItem)
private
FDate: TDateTime;
FCaption: string;
FImageIndex: Integer;
procedure SetCaption(const Value: string);
published
property Caption: string read FCaption write SetCaption;
end;
Type
TTypeOperation=class (TPersistent)
private
FProcedureName:String;
FParametrs:TCollection;
Procedure SetParametrs(const Value: TCollection);
public
destructor Destroy; override;
constructor Create(AOwner: TComponent);
published
property ProcedureName:string read FProcedureName write FProcedureName;
property Parametrs:TCollection read FParametrs write FParametrs;
end;
type
TDocumentOperation = class(TComponent)
private
FopInsert:TTypeOperation;
Procedure Setpoperation(value:TTypeOperation);
protected
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property opInsert:TTypeOperation read FopInsert write Setpoperation;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('CxDataControls', [TDocumentOperation]);
end;
procedure TopParametr.SetCaption(const Value: string);
begin
FCaption := Value;
end;
constructor TTypeOperation.Create(AOwner: TComponent);
begin
FParametrs:=TOwnedCollection.Create(Self, TopParametr);
end;
destructor TTypeOperation.Destroy;
begin
inherited;
FreeAndNil(FParametrs);
end;
procedure TTypeOperation.SetParametrs(const Value: TCollection);
begin
FParametrs.Assign(Value);
end;
constructor TDocumentOperation.Create(AOwner: TComponent);
begin
inherited;
FopInsert:=TTypeOperation.Create(self);
end;
destructor TDocumentOperation.Destroy;
begin
inherited;
FreeAndNil(FopInsert);
end;
procedure TDocumentOperation.Setpoperation(value: TTypeOperation);
begin
FopInsert:=value;
end;
end.
В итоге при инсталяции компонента у свойства Parametrs не отображается редактор