>Pertama tambahkan Coding dibawah (yang cetak tebal) ini di atas Variable :
...................................
...................................
type THackGrid = class(TDBGrid);
Var
.................
>Kemudian Pada event MouseMove diDBGRID :
procedure TForm1.DBGrid1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
Cell: TGridCoord;
ActRec: Integer;
begin
Cell := DBGrid1.MouseCoord(X, Y);
if dgIndicator in DBGrid1.Options then
Dec(Cell.X);
if dgTitles in DBGrid1.Options then
Dec(Cell.Y);
if THackGrid(DBGrid1).DataLink.Active and (Cell.X >= 0) and
(Cell.Y >= 0) then
begin
ActRec := THackGrid(DBGrid1).DataLink.ActiveRecord;
try
THackGrid(DBGrid1).DataLink.ActiveRecord := Cell.Y;
DBGrid.Hint := DBGrid1.Columns[Cell.X].Field.AsString;
finally
THackGrid(DBGrid1).DataLink.ActiveRecord := ActRec;
end;
end;
end;
Copas Sertakan Link Sumber : xtreme23koe.blogspot.com.
untuk contoh source code yang sudah jadi :
Download dari sini
Jangan Lupa juga >>
Assalamualaikum..
ReplyDeletereferensi project2 delphi silahkan kunjungi blog saya :
http://energi08pnup.blogspot.com/
mungkin saya bisa membantu..
smoga bermanfaat