MrZeRo

Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Вот фрагмент из той панели, где выводится "New". Цитата: procedure TMainForm.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin if Panel.Index=0 then DrawSolvedPanel(StatusBar, Panel, Rect) else if Panel.Index=1 then DrawModifiedPanel(StatusBar, Panel, Rect) else if Panel.Index=2 then DrawStatusPanel(StatusBar, Panel, Rect); end; procedure TMainForm.DrawStatusPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); var Left : Integer; OldFontColor : TColor; OldFontStyles : TFontStyles; Str : String; const spc=3; begin with StatusBar.Canvas do begin Left := Rect.Left; Inc(Left, spc); OldFontColor := Font.Color; OldFontStyles := Font.Style; try Font.Color := clBlack; Str := IntToStr(Some_int_var); TextOut(Left, Rect.Top, Str); Inc(Left, TextWidth(Str)+2*spc); Font.Color := clRed; Str := IntToStr(Some_int_var); TextOut(Left, Rect.Top, Str); Inc(Left, TextWidth(Str)+2*spc); Font.Style := Font.Style + [fsBold]; Font.Color := clNavy; Str := IntToStr(Some_int_var); TextOut(Left, Rect.Top, Str); finally Font.Color := OldFontColor; Font.Style := OldFontStyles; end; end; end; |
---------- ... не это главное ... |
|