1

is there a way how to display any of the non-printable characters in TRichEdit control ? Or at least paragraph at the end of each line ?

I've made a quick preview to the rich edit messages but can't see anything specific for this purpose. I'm just curious about it hoping there's a cleaner way than replacing chars (at least for that paragraph).

Thanks

Community
  • 1
  • 1
  • 2
    I don't think that the Windows Rich Edit control supports this. You might consider using a different text editor control. – Andreas Rejbrand Jul 26 '11 at 17:56
  • I think Scintilla can do this since Notepad++ does so. – David Heffernan Jul 26 '11 at 18:15
  • In addition, you are probably talking about 'hidden characters' (e.g. #$20, #$09, #$0C, and #$0A), and not general 'control characters', such as 'start of header', 'end of transmission', 'end of text', 'bell', 'shift in', etc. – Andreas Rejbrand Jul 26 '11 at 19:39
  • @Andreas - yes, about the _hidden characters_ whose displaying would make sense and which can be displayed in usual word editors. –  Jul 26 '11 at 19:51
  • Are you displaying rich text? Or are you displaying plain text? – David Heffernan Jul 26 '11 at 20:11
  • @David - yeah, the rich text. Initially, for the paragraph, I was hoping there is some setting in the [PARAFORMAT2](http://msdn.microsoft.com/en-us/library/bb787942%28v=VS.85%29.aspx) structure but it seems Andreas was right and it's really unsupported by [RichEdit](http://msdn.microsoft.com/en-us/library/bb787605%28v=VS.85%29.aspx) control. –  Jul 26 '11 at 20:24
  • So it's a Word like thing rather than a Notepad like thing. – David Heffernan Jul 26 '11 at 20:25
  • @David - I was just wondering if it's supported by RichEdit. At least those paragraphs. –  Jul 26 '11 at 20:30
  • 1
    I guess you can do it yourself, by simply adding a paragraph sign after each paragraph. I doubt there is a setting that makes TRichEdit do this automatically. – Rudy Velthuis Jul 26 '11 at 21:35

1 Answers1

1

There is no such feature in TRichEdit.

If you had TRichView you could just set rvoShowSpecialCharacters in the RichViewEdit.Options, and then call RichViewEdit.Reformat.

Warren P
  • 65,725
  • 40
  • 181
  • 316
  • +1 and accept; TRichView looks nice, but the price.. The most important for me is that it's not supported by TRichEdit. Thanks –  Jul 27 '11 at 07:53
  • 1
    I know that some delphi tools like Help&Manual that started out using RichEdit dropped it for dozens of reasons. They now use TRichView, and the experience (I am a user of Help & Manual) is worth the price. Using RichEdit is not so great in any commercial application, for anything other than fairly trivial purposes. I wouldn't write a word processor, help file editor, or even an insurance company form-letter-editing tool with RichEdit. – Warren P Jul 27 '11 at 13:29