Autor Beitrag
Eisenmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

XP
D4P
BeitragVerfasst: Do 27.10.05 11:34 
Hallo,

weiß jemand, wie ich die Position des Cursers in einem DBGrid mit Vertikaler Bildlaufleiste als Fensterkoordinate
bekomme.

der Eisenmann
Speed
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

WIN XP
Delphi 2006 Prof.
BeitragVerfasst: Fr 28.10.05 14:17 
Also wenns in einem DBGrid genauso ist, wie in einem Stringgrid, würd ichs so machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);

var Ort:TPoint;

begin
  Ort.X:=X;
  Ort.Y:=Y; //aktuelle Koordinaten
  Ort:=ScreenToClient(stringgrid1.ClientToScreen(Ort)); 
  //Clientkoordinaten erst auf auf Bildschirmkoordinaten umrechnen und dann in 
  //Fensterkoordinaten
end;


Könnt eventuell klappen...

Greetz Speed
Speed
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

WIN XP
Delphi 2006 Prof.
BeitragVerfasst: Fr 28.10.05 14:20 
Sorry, hab grad gesehen, dass du die Koordinaten vom Cursor willst und net von der Maus...