Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
procedure ChangeWordColor(RE: TrichEdit; TheWord: String; Color: TColor; Style: TFontStyles); var i, CharPos, noChars: Integer; cmp : TComponent; begin CharPos := 0; noChars := 0; for i := 0 to Pred(cmp.Lines.Count) do Begin noChars := noChars + Length(RE.Lines[i]); CharPos := RE.FindText(TheWord, CharPos, noChars, [stWholeWord]); RE.SelStart := CharPos; RE.SelLength := Length(TheWord); if RE.SelAttributes.Color = clRed then Begin RE.SelAttributes.Color := color; RE.SelAttributes.Style := Style; End; End; end;
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
8 Experts available now in Live!