这是一个解决方法:使用 OvcTable 的 MouseDown-Event 如下:
procedure TForm1.OvcTable1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
RowNum, ColNum: Integer;
begin
OvcTable1.CalcRowColFromXY(X, Y, RowNum, ColNum);
if (OvcTable1.Columns.List[ColNum].DefaultCell is TOvcTCCheckBox) and
((RowNum <> OvcTable1.ActiveRow) or (ColNum <> OvcTable1.ActiveCol)) then
begin
PostMessage(OvcTable1.Handle, ctim_StartEdit, 0, 0);
PostMessage(OvcTable1.Handle, ctim_StartEditMouse, 0, X + 65536 * Y);
end;
end;
来源: http: //sourceforge.net/tracker/ ?func=detail&atid=529790&aid=3562412&group_id=71004