Questions tagged [trichedit]

TRichEdit is a VCL control that wraps the Windows Rich Edit common control. It is defined in the ComCtrls.pas unit.

TRichEdit is a VCL control that wraps the Windows Rich Edit common control. It is defined in the ComCtrls.pas unit.

68 questions
53
votes
1 answer

How to make TRichEdit behave like WordPad on Windows 7 when changing font for certain non-text characters?

With the help of Sertac Akyuz, it seems the direct reason is related to the charset of \bullet: In my localized Windows, the \bullet input by typing Alt(0149) always gets \fcharset134, and attempts to change its font through EM_SETCHARFORMAT always…
SOUser
  • 3,802
  • 5
  • 33
  • 63
20
votes
4 answers

Using TRichEdit at runtime without defining a parent

I need to use a TRichEdit at runtime to perform the rtf to text conversion as discussed here. I succeded in doing this but I had to set a dummy form as parent if not I cannot populate the TRichedit.Lines. (Error: parent is missing). I paste my…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
6
votes
1 answer

How to detect URL links after setting EM_AUTOURLDETECT in TRichEdit?

I'm trying to implement URL detection for TRichEdit component using EM_AUTOURLDETECT message. I have a problem with the following code procedure TForm1.Button1Click(Sender: TObject); var Mask: Word; begin Mask := SendMessage(Handle,…
Martin Reiner
  • 2,167
  • 2
  • 20
  • 34
5
votes
1 answer

Painting TRichEdit to a canvas

I'm trying to implement an RTF-capable tool tip window in Delphi XE. To render the rich text, I'm using an off-screen TRichEdit. I need to do two things: Measure the size of the text. Paint the text To accomplish both tasks, I wrote this…
Cobus Kruger
  • 8,338
  • 3
  • 61
  • 106
5
votes
1 answer

Why doesn't EM_SETTEXTMODE work?

I'm trying to use EM_SETTEXTMODE on a RichEdit control in Delphi 7. Just create a new project, add a TRichEdit control and a TButton control and add the following code to the button's click handler: SendMessage(RichEdit1.Handle, WM_SETTEXT, 0,…
jedivader
  • 828
  • 10
  • 23
4
votes
1 answer

Printing a richedit with background colour

I'm outputting text from a delphi TRichedit control to a printer. There is a background image, so I'm using the EM_FORMATRANGE with this logic ... myrichedit.Perform(EM_FORMATRANGE, 1, Longint(@Range)); ... and that works fine except that when the…
Terry
  • 274
  • 1
  • 4
  • 16
4
votes
1 answer

Increase size/limit of TRichEdit?

I am having some issues with the TRichEdit. The first issue is if I try to paste a lot of text from the clipboard into a empty TRichEdit, it truncates the bottom of the text. The second issue, which I guess ties into the first issue, is that I seem…
user741875
4
votes
2 answers

TRichEdit suspend/resume undo function

Is there a way to suspend/resume the Undo recording in a TRichEdit control? Is there a message to send or a mode to set? EDIT I have solved it by using the ITextDocument interface. See my post below.
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
4
votes
2 answers

RichEdit, How to set the background color of one single line

I have a TRichEdit control containing source code. I want to set the background color of a single line. I know how to set the text color, but isn't there a way to set the background color as well? I'm not talking about the entire background colour…
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
3
votes
3 answers

Delphi lines colored Text component replacing TRichEdit to improve performances

I currently use TRichEdit as an 'real time' event log viewer in one of my software (in Delphi 7) and I recently profile my software and TRichEdit is consuming more than 40% of the software cpu time. I just want to test other components in order to…
philnext
  • 3,242
  • 5
  • 39
  • 62
3
votes
0 answers

Why TRichEdit removes images from a loaded file when TRichEdit.ReadOnly?

When I try to load an RTF file using RichEdit1.Lines.LoadFromFile(FilePath) method and RichEdit1.ReadOnly = True then the RichEdit removes all images from the RTF file and shows an empty area in their place: procedure TForm1.Button1Click(Sender:…
DmitryB
  • 455
  • 1
  • 5
  • 18
3
votes
1 answer

Adding true hyperlink support to TRichEdit

I need support for "friendly name hyperlink" in TRichEdit and all solutions I have found are based on autoURLs (EM_AUTOURLDETECT) which works by detecting strings entered by user that start with www (or http). But I want to place links on strings…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
3
votes
1 answer

Delphi TRichEdit.Perform( EM_FORMATRANGE, 0,Longint(@fmtRange));

i want to find the height that needs the TRichEdit control to render itself without showing the vertical scrollbar. I use this code function RichEditHeight(var RE : TRichEdit; aForm : TForm) : integer; var fmtRange: TFormatRange; begin …
JimPapas
  • 715
  • 2
  • 12
  • 27
3
votes
1 answer

How to scroll to the 'found' word that the user has entered in the finddialog box

I have a rich edit on a delphi form that includes a finddialog box. The user enters the word to be found, and the program correctly highlights the 'found' word -this much works fine. What I want, however, is for the program to scroll so that the…
Mariner
  • 71
  • 7
2
votes
1 answer

How can I change the color of certain characters in a TRichEdit?

I'm doing a Delphi 7 project where I have to let a user enter in a number (Layers going down) to build a Christmas tree, but I also need to display the output as * (stars). I am having a problem editing a certain line of stars in the TRichEdit to…
Jaryd
  • 21
  • 1
  • 2
1
2 3 4 5