LCL: Make DELETE key clear the whole cell in StringGrid when cell editor is not active, issue #22056

git-svn-id: trunk@37302 -
This commit is contained in:
juha 2012-05-17 07:35:15 +00:00
parent 32b63791ee
commit bf1459a3d8

View File

@ -6647,6 +6647,16 @@ begin
doCutToClipboard;
end;
end;
VK_DELETE:
if not FEditorKey and EditingAllowed(FCol)
and (Editor is TCustomEdit) and not (csDesigning in ComponentState)
then begin
EditorShow(True);
TCustomEdit(Editor).Text:='';
ResetEditor;
InvalidateCell(FCol,FRow,True);
SelectCell(FCol,FRow); // This does not really select the cell. Why?
end;
end;
if FEditorKey then
FRowAutoInserted:=False;