Quand on a plusieurs stringgrid dans la même Form,
comment peut-on savoir dans quelle stringgrig on clique
Version imprimable
Quand on a plusieurs stringgrid dans la même Form,
comment peut-on savoir dans quelle stringgrig on clique
Oui
Sender indique le Control cliqué,
mais aussi (moche)Code:
1
2
3
4
5
6
7 if (Sender is TStringGrid) then begin with TStringGrid(Sender) do begin Cells[] ... end; end;
Code:
1
2
3
4 if Sender = Grid1 then else if Sender = Grid2 then ...
Merci beaucoup, tu m'évites un détour interminable.