通过设置数据单元格的hint和ToolTips属性,当移动鼠标到该单元格时,可以显示单元格容纳不下的文本内容...

procedure Tfrm1.DBGrid1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
DBGrid1.ShowHint := true;
if FdmStoreManage.cdsBeiWL.RecordCount >0 then
DBGrid1.Hint := DBGrid1.SelectedField.AsString;
Application.HintHidePause := 60000;
end;
设置Column[i]的ToolTips为True
DBGridEh的ShowHint为True
当容不下时就会出现Hint

原文地址:https://www.cnblogs.com/martian6125/p/9631483.html