Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Formatierten Text in ein TRichEdit einfügen (https://www.delphipraxis.net/56136-formatierten-text-ein-trichedit-einfuegen.html)

3_of_8 1. Nov 2005 12:10


Formatierten Text in ein TRichEdit einfügen
 
Hallo! Ich habe ein ReadOnly TRichEdit und will da rein einen formatierten Text einfügen, direkt aus dem Code heraus. Wie mache ich das?

Lannes 1. Nov 2005 12:25

Re: Formatierten Text in ein TRichEdit einfügen
 
Hallo,

z.B.
Delphi-Quellcode:
  with Richedit1 do
  begin
    SelStart := 2;
    SelAttributes.Color := clRed;
    SelText := 'Hallo';
  end;

3_of_8 1. Nov 2005 12:46

Re: Formatierten Text in ein TRichEdit einfügen
 
Ahja. Einfacher gehts nicht?

robinWie 1. Nov 2005 12:58

Re: Formatierten Text in ein TRichEdit einfügen
 
Es geht einfacher ist dan aber schwieriger zu Formatieren
Delphi-Quellcode:
 with RichEdit1 do begin
             Lines.Add('Hallo #1');
             Lines.Add('Hallo #2');
            end;
Gurß Robin

3_of_8 1. Nov 2005 13:01

Re: Formatierten Text in ein TRichEdit einfügen
 
Heißt praktisch, ich müsste eine Komponente downloaden/basteln. Ich spreche hier von einem Chat, in dem jeder User seine eigene Schriftfarbe auswählen kann.


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:18 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz