unit SiatkaN;

interface

uses
  SysUtils, Classes, Controls, Grids,Windows, Messages;

type
  TSiatkaN = class(TStringGrid)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
        procedure DrawCell(ACol, ARow: Longint; ARect: TRect;AState: 
                                        TGridDrawState); override;
    { Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TSiatkaN]);
end;

procedure TSiatkaN.DrawCell(ACol, ARow: Longint; ARect: TRect;
  AState: TGridDrawState);
begin
  if DefaultDrawing then
   Canvas.TextRect(ARect, ARect.Right-Canvas.TextWidth(Cells[Acol,Arow])-4, 
                                ARect.Top+2, Cells[ACol, ARow]);
end;

end.
