Solved

RichEdit Plaintext value and SaveDialog

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run video youtube webbrowse 10 57
Create a path if not exists 7 68
Find and Replace Stream with 0s 8 56
Performance of SQL statement 37 95
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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

8 Experts available now in Live!

Get 1:1 Help Now