不难,关键将Grid的InplaceEdit修改。你自己试试。在编辑状态下有效,如果你想在任何状态下有效,我建议你不用DBGrid,修改stringGrid。用修改后的stringGrid代替。
procedure TInplaceEdit.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
//Params.Style := Params.Style or ES_MULTILINE;
改为
Params.Style := Params.Style or ES_MULTILINE or ES_AUTOVSCROLL or ES_AUTOHSCROLL
end;