1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
type
TOptionQuery = class(TPersistent)
.....
published
.....
property CxEditor : TCxDBTextEditor read CxEditor write SetCxEditor ;
end;
TMyBaseQuery= class(TMyQuery)
....
protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
constructor Create(AOwner: TComponent);override;
Destructor Destroy; override;
procedure Notification()
published
property QOption: TOptionQuery read FQOption write FQOption;
end;
// cxEditor est un control de type TDBEdit
........
procedure TMyBaseQuery.Notification(AComponent: TComponent; Operation: TOperation);
begin
inherited Notification(AComponent,Operation);
if (Operation=opRemove) and (AComponent=QOption.CxEditor) then
QOption.CxEditor := nil;
end; |
Partager