hallo,
ich hab ein problem mit MouseToCell. leider ist
iCurCol immer
0, egal worauf geklickt wurde. kann mir jmd bei einer lösung helfen?
Delphi-Quellcode:
procedure TfrmMain.StrGridMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
StrGrid.MouseToCell(Y, Y, iCurCol, iCurRow);
if iCurRow = 0 then
begin
SortCol := iCurCol;
ShowMessage(IntToStr(iCurCol) + ' ' + IntToStr(iCurRow));
SortStringGrid(StrGrid, SortCol);
end;
end;
//edit
fehler gefunden.
StrGrid.MouseToCell(
X, Y, iCurCol, iCurRow);