Autor Beitrag
kuba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Mo 26.03.07 17:12 
wie kann ich eigentlich abfangen, ob ich auf eine Zelle im Stringgrid geklickt habe oder auf den unteren weißen Bereich?

Vielen Dank im Voraus
Kuba
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 26.03.07 20:49 
Hallo,

kommt darauf an in welchem Ereignis Du das feststellen willst.
Das Ereignis OnSelectCell und OnClick wird nur aufgerufen wenn in eine Zelle geklickt wird.
Sonst z.B.:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.StringGrid1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var ACol,Arow : Integer;
begin
  StringGrid1.MouseToCell(X,Y,ACol,ARow);
  if ACol <> -1 then
    //Klick im Zellbereich
end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
kuba Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Di 27.03.07 09:46 
Vielen Dank Lannes. Deine Antwort hat mir wirklich sehr weitergeholfen.

Viele Grüße
Kuba