利用 mouse event + StringGrid.MouseToCell method 得到 col and row

void __fastcall TLCDSimForm::sgComSegViewMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
int iCol, iRow;
TStringGrid *sgTable = (TStringGrid *)Sender;
sgTable->MouseToCell(X, Y, iCol, iRow);
}

 

Reference: [BCB] StringGrid 使用大全

文章標籤
全站熱搜
創作者介紹
創作者 Nola 的頭像
Nola

學習就是生活

Nola 發表在 痞客邦 留言(0) 人氣(1,096)