Solved

TRichEdit Steeings

Posted on 1998-02-14
1
143 Views
Last Modified: 2010-04-04
 I would like to advance the program in the Delphi Demo section for the Text Editer.  The only problem is I have to save the file as a true ASCII file.  (No added Codes)  Is there a way to set Trich to save as a true text file only..
 
0
Comment
Question by:jim zerbe
1 Comment
 
LVL 4

Accepted Solution

by:
itamar earned 50 total points
ID: 1359195
Hi jim,

detect if the TXT type was selected by the user when saving the file and set the PlainText property to true. Example:

  If UpperCase(ExtractFileExt(SaveDialog.FileName)) = '.TXT' Then
     RichEdit1.PlainText := True;
  RichEdit1.Lines.SaveToFile(SaveDialog.FileName);
  RichEdit1.PlainText := False;

Don't forget setting the PlainText to false again.


IHTH,

Itamar
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question