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 Memo feld mit textformatierung (https://www.delphipraxis.net/95867-memo-feld-mit-textformatierung.html)

mr.unbekannt 14. Jul 2007 21:38


Memo feld mit textformatierung
 
Hi@all,

kennt jemand von euch eine Memo-Komponente, mit der man textformatierung machen kann, also auch verschiedene Farben und so nutzen kann? Wär schön, wenn ihr auch ein link mit dazu legt.

Danke

DeddyH 14. Jul 2007 21:47

Re: Memo feld mit textformatierung
 
Nimm ein TRichEdit (auf der Seite Win32 der Komponentenpalette)

mr.unbekannt 14. Jul 2007 21:50

Re: Memo feld mit textformatierung
 
Und wie kann man da unterschiedliche Farben einfügen?

DeddyH 14. Jul 2007 21:54

Re: Memo feld mit textformatierung
 
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  with RichEdit1 do
    begin
      Lines.Clear;
      Lines.Add('Hallo Welt');
      SelStart := 6;
      SelLength := 4;
      SelAttributes.Color := clRed;
      SelAttributes.Style := [fsBold];
    end;
end;

mr.unbekannt 14. Jul 2007 21:58

Re: Memo feld mit textformatierung
 
Okay, danke. Das ist das, was ich gesucht habe.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:23 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