![]() |
AW: Formatierte Textausgabe in TMemo
Zitat:
|
AW: Formatierte Textausgabe in TMemo
Wie schon gesagt, bei RichEdit geht das. Hatte eine Prozedur parat, habe sie aber gerade aktualisiert. Sollte aber funktionieren.
Delphi-Quellcode:
//ToDo: Falsche Reihenfolge (z. B. 20, 30, 10) führt zu fehlerhaften Tabstops.
procedure SetTabStops(RichEdit: TRichEdit; TabStops: array of Word); var i: Integer; begin if High(TabStops) > 255 then //255 = Max-Anzahl von Tabstops raise Exception.Create('Zu viele Tabstops (über 255).'); RichEdit.Paragraph.TabCount := 0; for i := 0 to High(TabStops) do begin RichEdit.Paragraph.TabCount := RichEdit.Paragraph.TabCount + 1; RichEdit.Paragraph.Tab[i] := TabStops[i]; end; end; procedure TForm1.Button1Click(Sender: TObject); begin RichEdit1.Clear; SetTabStops(RichEdit1, [50, 100, 150, 300]); RichEdit1.SelText := 'Claudia' + #9 + 'Anja' + #9 + 'Sonja' + #9 + 'Ulrike' + #9 + 'Kiara'; end; |
AW: Formatierte Textausgabe in TMemo
|
AW: Formatierte Textausgabe in TMemo
Hallo,
vielen Dank! Sehr nützliche Tipps. Konnte leider nicht früher antworten... melde mich sobald ich ne ordentliche Lösung habe! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz