HeaderControl要怎麼找出要draw的Section |
尚未結案
|
fantasy
一般會員 發表:10 回覆:9 積分:3 註冊:2003-11-27 發送簡訊給我 |
各位高手,小妹有些secton問題,想要在上想出現圖
卻每一個section都跑出來,想問一下有沒有方法能方便判斷出
section出來 我寫了如下,但是每次都全部出現,有夠討厭的 \/
void __fastcall TForm1::draw(TRect &x){ Graphics::TPicture *tp; tp=new TPicture; tp->LoadFromFile("C:\\ICONS\\vaio\\io_073.ico"); HeaderControl1->Canvas->Draw(x.left,x.top,tp->Icon); } void __fastcall TForm1::HeaderControl1DrawSection( THeaderControl *HeaderControl, THeaderSection *Section, const TRect &Rect, bool Pressed) { ShowMessage(HeaderControl1->Sections->Count); int icount=HeaderControl1->Sections->Count; for(int i=0;i |
RaynorPao
版主 發表:139 回覆:3622 積分:7025 註冊:2002-08-12 發送簡訊給我 |
引言: 各位高手,小妹有些secton問題,想要在上想出現圖 卻每一個section都跑出來,想問一下有沒有方法能方便判斷出 section出來 我寫了如下,但是每次都全部出現,有夠討厭的 \/fantasy 你好: 試試看這樣子寫行不行呢?? < class="code"> Graphics::TPicture *tp=NULL; __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { tp=new TPicture; tp->LoadFromFile("C:\\test.ico"); } __fastcall TForm1::~TForm1() { delete tp; } void __fastcall TForm1::HeaderControl1DrawSection( THeaderControl *HeaderControl, THeaderSection *Section, const TRect &Rect, bool Pressed) { if(Section->Text=="0") { HeaderControl->Canvas->Draw(Rect.Left, Rect.Top, tp->Icon); } } -- Enjoy Researching & Developing --void __fastcall TForm1::draw(TRect &x){ Graphics::TPicture *tp; tp=new TPicture; tp->LoadFromFile("C:\\ICONS\\vaio\\io_073.ico"); HeaderControl1->Canvas->Draw(x.left,x.top,tp->Icon); } void __fastcall TForm1::HeaderControl1DrawSection( THeaderControl *HeaderControl, THeaderSection *Section, const TRect &Rect, bool Pressed) { ShowMessage(HeaderControl1->Sections->Count); int icount=HeaderControl1->Sections->Count; for(int i=0;i
------
-- 若您已經得到滿意的答覆,請適時結案!! -- -- 欲知前世因,今生受者是;欲知來世果,今生做者是 -- -- 一切有為法,如夢幻泡影,如露亦如電,應作如是觀 -- |
fantasy
一般會員 發表:10 回覆:9 積分:3 註冊:2003-11-27 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |