Utilise un RichEdit pour afficher du texte formatté.
Pour mon exemple pose un RichEdit et un FontDialog sur une fiche
- modifie l'apparence du texte sélectionné :
if FontDialog1.Execute then
begin
with RichEdit1.SelAttributes do begin
Name := FontDialog1.Font.Name;
Color := FontDialog1.Font.Color;
Pitch := FontDialog1.Font.Pitch;
Size := FontDialog1.Font.Size;
etc...
end;
end;
- Pour sauvegarder et ouvrir le fichier rtf :
RichEdit1.Lines.SaveToFile('c:/example.txt'); et
RichEdit1.Lines.LoadFromFile('c:/example.txt');
Télécharger Outlook Skype Plugin et mes autres réalisations sur mon site
[ Lien ]