Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TRichEdit Steeings

Posted on 1998-02-14
1
Medium Priority
?
151 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

886 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