- Offizieller Beitrag
With WPTools 5 this popular programming interface can be used like this:
Code
var col : Integer;
begin
col := WPRichText1.CurrAttr.ColorToNr(clRed, true);
WPRichText1.CPPosition := 0;
repeat
if WPRichText1.CPChar in ['A'..'Z'] then
begin
WPRichText1.CPAttr.BeginUpdate;
WPRichText1.CPAttr.Color := col;
WPRichText1.CPAttr.IncludeStyle(afsBold);
WPRichText1.CPAttr.EndUpdate;
end;
until not WPRichText1.CPMoveNext;
end;
Alles anzeigen
The above will change all capital letters to Bold, Red