![]() |
Formatierbares Eingebefeld
Hallo! Ich suche eine Art TRichEdit, die man leicht formatieren kann, am besten so wie in HTML oder BB-Code, also praktisch: asdffdsaasdf => asdffdsaasdf
|
Re: Formatierbares Eingebefeld
Probier mal RichEdit1.Paragraph
|
Re: Formatierbares Eingebefeld
|
Re: Formatierbares Eingebefeld
@robinWie: Hilft mir nicht weiter, leider.
@marabu: Danke. Ich habe gefunden, was ich brauchte, aber ich verstehe es noch nicht ganz. Was bedeutet was im einzelnen?
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var MyMS: TMemoryStream; MyRTFList : TStringList; s1, s2 ,s3 ,s4 : String; begin s1 := 'Fett und grün'; s2 := 'Kursiv und schwarz'; s3 := 'Normal und blau'; s4 := 'Fett und magneta'; MyRTFList := TStringList.Create; MyMS := TMemoryStream.Create; try MyRTFList.Add('{\rtf1{\fonttbl{\f0 Arial;\f1 Courier;}}'); MyRTFList.Add('{\colortbl;\red0\green128\blue0;\red0\green0\blue0;\red0\green0\blue255;\red255\green0\blue255;\red255\green0\blue0;}'); MyRTFList.Add('\pard\plain\fs24'); MyRTFList.Add('\cf1\b '+s1+'\b0\par'); MyRTFList.Add('\cf2\i '+s2+'\i0\par'); MyRTFList.Add('\cf3 '+s3+'\par'); MyRTFList.Add('\cf4\b '+s4+'\b0\par'); MyRTFList.Add('\cf2\ul Unterstrich\ul0\par'); MyRTFList.Add('\f1\fs16 kleine Schrift\par\tab in Courier 8}'); MyRtfList.SaveToStream(MyMS); MyMS.Seek(soFromBeginning,0); RichEdit1.PlainText := False; RichEdit1.Lines.LoadFromStream(MyMS); finally MyRTFList.Free; MyMS.Free; end; end; |
Re: Formatierbares Eingebefeld
Du siehst da im wesentlichen RTF command words. Beschrieben sind die in der
![]() marabu |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:44 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