unit stringgrid1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids;
type
tstringgrid1 = class(TStringGrid)
private
{ Private declarations }
protected
{ Protected declarations }
function SelectCell(ACol, ARow: Longint): Boolean; override;
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [tstringgrid1]);
end;
function tstringgrid1.SelectCell(ACol, ARow: Longint): Boolean;
begin
inherited cells[ACol, ARow];
if Cells[ACol, ARow] = '' then
Cells[ACol, ARow] := 'select';
end;
end.