procedure UpdateEditor;
begin
FInplaceCol := Col;
FInplaceRow := Row;
FInplaceEdit.UpdateContents;
if FInplaceEdit.MaxLength = -1 then FCanEditModify := False
else FCanEditModify := True;
// FInplaceEdit.SelectAll; //将这句程序注释掉就行了。
end;
begin
if CanEditShow then
begin
if FInplaceEdit = nil then
begin
FInplaceEdit := CreateEditor;
FInplaceEdit.SetGrid(Self);
FInplaceEdit.Parent := Self;
UpdateEditor;
end
else
begin
if (Col <> FInplaceCol) or (Row <> FInplaceRow) then
begin
HideEdit;
UpdateEditor;
end;
end;
if CanEditShow then FInplaceEdit.Move(CellRect(Col, Row));
end;
end;