Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.05.05 13:55 
Wie ermittele ich die Zelle eines StringGrids über der sich die Maus gerade befindet ?

Ich möchte nämlich items von einer listbox in die zelle verschieben. (per drag&drop)
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 05.05.05 15:54 
mousetocell

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.05.05 15:57 
wie benutze ich des, beispiels weise ich habe:
ausblenden Delphi-Quelltext
1:
stringgrid1.cells[x, y] := 'Blubb';					

wie bekomme ich des da rein ? Oder liefert mousetocell ein TPoint ?
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 05.05.05 16:00 
:shock:
Zitat:
Oder liefert mousetocell ein TPoint ?

stringrid.mousetocell eingeben und F1 drücken sind weit weniger Aufwand, als hier nochmal zu fragen. und mit übber 1000 posts, wird man wohl in der Lage sein, das alleine hinzubekommen. Ehrlich.

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.05.05 16:01 
wenn ich aber nun gerade kein delphi zur hand habe :?:
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 05.05.05 16:03 
dann wartest du halt. wenn ich dir schreibe, das mousetocell 2 Var-Paramter Acol und Arow hat, nützt dir das ohne Delphi genauso wenig. :roll:

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 05.05.05 16:07 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
var
  row, col: integer;
begin
  stringgrid1.mousetocell(x, y, row, col);
  label1.Caption:= inttostr(row) + '/' + inttostr(col);
end;


funzt soweit, danke :mrgreen: