Thema: Delphi Richedit Farbe ?

Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#19

Re: Richedit Farbe ?

  Alt 26. Feb 2006, 08:15
Guten Morgen Vader.

Du bist ja richtig anspruchsvoll. Pass auf die geänderte Signatur auf:

Delphi-Quellcode:
procedure SetParaColor(re: TRichEdit; const cl: TColor;
    const index: Cardinal; const count: Cardinal = 1);
begin
  if (index < re.Lines.Count) and (count >= 1) then
  begin
    re.SelStart := re.Perform(EM_LINEINDEX, index, 0);
    re.SelLength := re.Perform(EM_LINEINDEX, index + count, 0) - re.SelStart;
    re.SelAttributes.Color := cl;
  end;
end;
Freundliche Grüße vom marabu
  Mit Zitat antworten Zitat