unit
DBGridEx;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, DBGrids;
type
TMyInplaceEdit =
class
(TInplaceEdit)
published
property
Color;
end
;
TMyDBGrid =
class
(TDBGrid)
protected
function
CreateEditor: TInplaceEdit; override;
end
;
procedure
Register;
implementation
procedure
Register;
begin
RegisterComponents(
'Standard'
, [TMyDBGrid]);
end
;
function
TMyDBGrid
.
CreateEditor: TInplaceEdit;
var
aEdit: TMyInplaceEdit;
begin
aEdit := TMyInplaceEdit
.
Create(Self);
aEdit
.
Color := clGreen;
Result := aEdit;
end
;
end
.