Solved

How to add a footnote into a RichEdit?

Posted on 1998-04-26
4
361 Views
Last Modified: 2013-11-22
When I load a *.rtf file with footnote into the richedit, the footnote displays right. And then, if I copy the
footnote and paste it to the other place of the RichEdit
the result is right again. It's Fine. But how I make
the footnote myself, and then put it into the clean richedit?
It is easy to set usual styles like Bold, Italic ext.
but how about the footnote? I think, there must be some
solution becouse the footnote will display right if
I copy exists footnote or load it from the rtf-file.

- Rauno -
0
Comment
Question by:raunol
[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
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1337078
Hi raunol,

I found this on the net :

Peter Below wrote :

Steve,

                           the richedit control supports only a subset of RTF and footnotes are not
                           among them. So you would need to post-process the produced RTF file. You can
                           find the RTF specs as far as it is supported by the help compiler in the
                           hcw.hlp file in your help\tools directory under the Delphi root. The full RTF
                           specs can be found on Microsofts website or the MSDN Library CD.

                           Peter Below (TeamB) 100113.1101@compuserve.com)

Regards, ZiF.
0
 

Author Comment

by:raunol
ID: 1337079
Hi,

Thank's about Your answer. Do it mean in practic that
I first save rtf-file, and then I manipulate the file and
add footnote-code? It will work, but is complicated.

Rtf-specks I have, but the problem was
how to get the TRichEdit working straight so that
it understand footnotes? Like I asked, the
control reads footnotes from the file and after
then also displays them correctly, but do You know
how I can just write footnotes my self? If I
write rtf-code "/footnote" to richedit it
will display as text, not like it should.
Also SaveToFile-method adds double "//" mark for
my "/footnote", so the code I wrote corrupted.

Stupid that there are in TTextAttributes only bold,
italic and single underlying. Can I add more styles?

RichEdit-component doesn't display correctly for example double-underlying, but footnotes it displays correctly!
So I think there must be some way to write text with footnotes self too, so that they display correctly in the control, not only then when I read them from the file. Hopeless I explaned understandably, mostly I speak Finnish ;-)

- Rauno -

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337080
Hi raunol,

As far as I know, you've to make an enhanced TRichEdit, if you want these functions. Maybe some authors already made such a RichEdit.... Look at Delphi Super Page and Torries for example..

Regards, ZiF.
0
 

Author Comment

by:raunol
ID: 1337081
Hi, zif

Ok, thanks for Your comment and answer.
(Btw, in the pages You mentioned, there are a lot of
 interesting for delphi)

- Rauno -
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

Suggested Solutions

Title # Comments Views Activity
Comparing dates in Delphi. Greater than/ Less than 3 295
delphi parse string to params 3 156
Performance of SQL statement 37 137
Dynamically Created Query 3 70
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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