anchor.diff:  
   unit mGridEditors;
   
  -{$mode objfpc}
  -{$H+}
  +{$IFDEF FPC}
  +{$MODE DELPHI}
  +{$ENDIF}
   
   interface
   
   uses
     Classes, Grids,
  -  LCLType;
  +  LCLType
  +//  ,ECEditBtns
  +  ;
   
   type
     (*
  
positive.code: 
    *)
  
    { TmExtStringCellEditor }
  
    TmExtStringCellEditor = class (TStringCellEditor)
    strict private
      FParentGrid : TCustomStringGrid;
      FOnKeyPressEvent : TOnSelectEvent;
      FDefaultEditKey : Word;
      FDefaultClearKey : Word;
      FAllowDeleteWhenReadOnly : boolean;
    protected
      procedure KeyDown(var Key : Word; Shift : TShiftState); override;
    public
      constructor Create(Aowner : TComponent); override;
  
      property ParentGrid : TCustomStringGrid read FParentGrid write FParentGrid;
      property OnKeyPressEvent : TOnSelectEvent read FOnKeyPressEvent write FOnKeyPressEvent;
      property DefaultEditKey : Word read FDefaultEditKey write FDefaultEditKey;
      property DefaultClearKey : Word read FDefaultClearKey write FDefaultClearKey;
      property AllowDeleteWhenReadOnly : boolean read FAllowDeleteWhenReadOnly write FAllowDeleteWhenReadOnly;
    end;
  
  implementation
  
  { TmExtStringCellEditor }
  
  procedure TmExtStringCellEditor.KeyDown(var Key: Word; Shift: TShiftState);
  begin
    inherited KeyDown(Key, Shift);
    if Key = FDefaultEditKey then
    begin
      if Assigned(FOnKeyPressEvent) then
        FOnKeyPressEvent(Self, FParentGrid.Col, FParentGrid.Row);
      Self.Text := FParentGrid.Cells[FParentGrid.Col, FParentGrid.Row];
    end
    else
    if FAllowDeleteWhenReadOnly and (Self.ReadOnly) and (Key = FDefaultClearKey) then
  
negative.code:   end;
  end;
  
  procedure TmExtStringCellEditor.DblClick;
  var
    newValue : string;
  begin
    inherited DblClick;
    if Assigned(FOnShowEditorEvent) then
    begin
      if FOnShowEditorEvent(FParentGrid.Col, FParentGrid.Row, newValue) then
        Self.Text := newValue; //FParentGrid.Cells[FParentGrid.Col, FParentGrid.Row];
    end;
  end;
  
  constructor TmExtStringCellEditor.Create(Aowner: TComponent);
  begin
    inherited Create(Aowner);
    FDefaultShowEditorKey:= VK_RETURN;
    FDefaultShowWizardKey:= VK_F1;
    FDefaultClearKey:= VK_DELETE;
    FAllowDeleteWhenReadOnly:= true;
  end;
  