Einzelnen Beitrag anzeigen

Benutzerbild von chaosben
chaosben

Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
 
Delphi XE2 Professional
 
#6

Re: VirtualStringTree (VST) und Progressbar einbinden

  Alt 28. Apr 2009, 05:35
Ja, sorry ... mein Fehler.
Natürlich muss man vor dem TextOut nicht dem Pen sondern dem Font die Farbe zuweisen.

Delphi-Quellcode:
Text := Format('%d %%', [NData.Percent]);
Font.Color := clBlue; //<----- hier
Brush.Style := bsClear;

TextOut(CellRect.Left + ((CellRect.Right - CellRect.Left) div 2) - (TextWidth(Text) div 2),
        CellRect.Top + ((CellRect.Bottom - CellRect.Top) div 2) - (TextHeight(Text) div 2),
        Text);
Benjamin Schwarze
If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
  Mit Zitat antworten Zitat