Solved

RichEdit Plaintext value and SaveDialog

Posted on 1997-07-20
1
267 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

21 Experts available now in Live!

Get 1:1 Help Now