TStringGrid 的 column |
尚未結案
|
BorlandUser
中階會員 發表:148 回覆:217 積分:73 註冊:2004-02-19 發送簡訊給我 |
|
lijenyun
一般會員 發表:3 回覆:19 積分:9 註冊:2003-06-22 發送簡訊給我 |
Try this: procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var lCol, lRow: Integer; lRect: TRect; begin StringGrid1.MouseToCell(X, Y, lCol, lRow); if not (lRow = 0) then begin Exit; end; lRect := StringGrid1.CellRect(lCol, lRow); DrawButtonFace(StringGrid1.Canvas, lRect, lRect.Right - lRect.Left, bsNew, True, False, False); end; procedure TForm1.StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var lCol, lRow: Integer; lRect: TRect; begin StringGrid1.MouseToCell(X, Y, lCol, lRow); if not (lRow = 0) then begin Exit; end; lRect := StringGrid1.CellRect(lCol, lRow); DrawButtonFace(StringGrid1.Canvas, lRect, lRect.Right - lRect.Left, bsNew, True, True, False); end;. |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |