Solved

RichEdit Plaintext value and SaveDialog

Posted on 1997-07-20
1
285 Views
Last Modified: 2013-11-22
When using a SaveDialog component you can use filters, I use two, Rich Text Format *.rtf, and Plain Text Format *.txt. how do I make it so when I click on *.txt the value "plaintext" from the Richedit component becomes true, and equally when saving a *.rtf extension it is false?
0
Comment
Question by:hellfire052497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
erajoj earned 50 total points
ID: 1339288
You could ofcourse use the filterindex value but then you
wouldn't be sure.
To be really sure you have to check the extension:
...
  with SaveDialog1 do if Execute then begin
    RichEdit1.PlainText := CompareText(ExtractFileExt(FileName), '.rtf')<>0;
    RichEdit1.Lines.SaveToFile(FileName);
  end;
...

/// John

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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