如何改變 tstatusbar之特定 panel 之 font color |
尚未結案
|
QOO10
初階會員 發表:59 回覆:89 積分:29 註冊:2002-12-25 發送簡訊給我 |
如主旨!!我查了相關問題如
http://delphi.ktop.com.tw/topic.php?topic_id=20131
但還是不懂請前輩救救我!!
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
This is an example written in Delphi. The Style property of the Panels should be psOwnerDraw.
procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin with StatusBar.Canvas do begin Brush.Color := clYellow; case Panel.Index of 0: Font.Color := clBlack; 1: Font.Color := clBlue; else Font.Color := clGreen; end; FillRect(Rect); TextRect(Rect,Rect.Left 1,Rect.Top 1,Panel.Text); end; end; |
QOO10
初階會員 發表:59 回覆:89 積分:29 註冊:2002-12-25 發送簡訊給我 |
引言: This is an example written in Delphi. The Style property of the Panels should be psOwnerDraw.謝謝您!!procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin with StatusBar.Canvas do begin Brush.Color := clYellow; case Panel.Index of 0: Font.Color := clBlack; 1: Font.Color := clBlue; else Font.Color := clGreen; end; FillRect(Rect); TextRect(Rect,Rect.Left 1,Rect.Top 1,Panel.Text); end; end; |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |