全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:818
推到 Plurk!
推到 Facebook!

消失了的文字 (TStringGrid)

答題得分者是:likush
BorlandUser
中階會員


發表:148
回覆:217
積分:73
註冊:2004-02-19

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-09-17 12:21:19 IP:203.185.xxx.xxx 未訂閱
Procedure TMainCustomerForm.ContactGridDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); Begin With ContactGrid Do Begin If State=[gdSelected] then begin If (ACol = 2) And (ARow > 0) Then Begin If (m_ModeStatus = 'Ready') Then Begin Canvas.Brush.Color:= ConvertColor('Disable_Color'); Canvas.FillRect(Rect); End; If (m_ModeStatus = 'New') Or (m_ModeStatus = 'Amend') Then Begin Canvas.Brush.Color:= ConvertColor('Mandatory_Color'); Canvas.FillRect(Rect); End; If (m_ModeStatus = 'View') Then Begin Canvas.Brush.Color:= ConvertColor('ReadOnly_Color'); Canvas.FillRect(Rect); End; End; End; End; End; 為什麼會看不到文字,即cell有色,但字就消失了,而進入editor mode先可以睇回cell內的文字??
likush
高階會員


發表:5
回覆:235
積分:103
註冊:2002-10-08

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-09-17 13:55:53 IP:220.134.xxx.xxx 未訂閱
請加 canvas.textout(rect,left,rect.top,contactgrid.cells[col,row]); ========================= 讀萬卷書~不如來K.TOP走一遭 =========================
likush
高階會員


發表:5
回覆:235
積分:103
註冊:2002-10-08

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-09-17 13:59:07 IP:220.134.xxx.xxx 未訂閱
不好意思,打錯了 canvas.textout(rect.left,rect.top,cells[col,row]); ========================= 讀萬卷書~不如來K.TOP走一遭 =========================
系統時間:2024-06-29 14:08:23
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!