Solved

TRichEdit Steeings

Posted on 1998-02-14
1
139 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now