Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RichEdit Plaintext value and SaveDialog

Posted on 1997-07-20
1
Medium Priority
?
292 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 200 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

Industry Leaders: 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

688 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