詢問TStringGrid的cell的問題 |
答題得分者是:RaynorPao
|
kenbcb
中階會員 發表:171 回覆:129 積分:60 註冊:2003-07-15 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
Search for OnDrawCell http://delphi.ktop.com.tw/link.asp?topic_id=23049 Hint: use a Timer
|
RaynorPao
版主 發表:139 回覆:3622 積分:7025 註冊:2002-08-12 發送簡訊給我 |
引言: 請問各位: 要如何使一個cell有閃爍的功能呢 ~請各位指導~謝謝kenbcb 你好: 請參考以下的範例程式碼 (可以讓 Cells[1][1] 不斷閃爍) < class="code"> TColor color; void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, int ACol, int ARow, TRect &Rect, TGridDrawState State) { if(ARow==1 && ACol==1) { StringGrid1->Canvas->Brush->Color=color; StringGrid1->Canvas->FillRect(Rect); StringGrid1->Canvas->TextOut(Rect.Left 2, Rect.Top 2, StringGrid1->Cells[ARow][ACol]); } } void __fastcall TForm1::Timer1Timer(TObject *Sender) { color=(color==clBlue)? clRed: clBlue; StringGrid1->Repaint(); } -- Enjoy Researching & Developing -- 發表人 - RaynorPao 於 2003/08/18 13:56:41
------
-- 若您已經得到滿意的答覆,請適時結案!! -- -- 欲知前世因,今生受者是;欲知來世果,今生做者是 -- -- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 -- |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |