Autor Beitrag
moloch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 01.10.04 08:26 
Hallo Leute,
steht bestimmt schon irgendwo im Forum, aber die Suche funktioniert irgendwie nicht.

Kann mir jemand sagen ob es einen einfacheren Weg gibt den Hint der jeweiligen Spalte über der man sich befindet auszugeben als zu berechnen?

mfg
moloch
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 01.10.04 08:31 
ok habs hinbekommen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
procedure TTagesDetail.ShowCellHint(X, Y: Integer);
var
  ACol, ARow: Integer;
begin
  //ShowHint auf True setzen
  if StringGrid.ShowHint = False then
    StringGrid.ShowHint := True;

  //Col und Row Position lesen
  StringGrid.MouseToCell(X, Y, ACol, ARow);
  //wenn im gültigen Bereich zeige Zelleninhalt als Hint
  if (ACol <> -1) and (ARow <> -1) then
    StringGrid.Hint := StringGrid.Cells[ACol, ARow];
  if (ACol <> LastCol) or (ARow <> LastRow) then
  begin
    Application.CancelHint;
    LastCol := ACol;
    LastRow := ARow;
  end;
end;




mfg
moloch

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.