Questions involving the Windows Rich Edit control. This tag also applies when using wrappers around the underlying Rich Edit control (e.g. RichTextBox in WinForms, TRichEdit in VCL, RichEditBox in WinRT) when attempting to operate with the underlying control, or using features of the control.
Questions tagged [richedit]
285 questions
1
vote
1 answer
Make the first 4 characters in a richedit line bold
How can I make the first 4 characters in a line I am going to add bold?
Example:
richedit1.Lines.Add('Test123');
I want Test to be bold but leave 123 normal.
Can someone help me?

jwz104
- 337
- 2
- 10
- 22
1
vote
1 answer
How to change the font smoothing (anti-aliasing) quality of a RichEdit in Delphi?
I have a Delphi 7 application where I'm drawing text to a TBitmap. I need to be able to control the anti-aliasing quality of the text. For this purpose I'm using the following procedure:
procedure SetFontQuality(Font: TFont; Quality: Byte);
var
…

jedivader
- 828
- 10
- 23
1
vote
3 answers
RichEdit Syntax Highligh
i need your help! So, i'm creating a RichEdit with syntax highlighter, i'm doing this way:
SendMessage(hWin, WM_SETREDRAW, false, 0);
CHARFORMAT2 format, old;
format.cbSize = sizeof(format);
old.cbSize =…

user3124543
- 35
- 4
1
vote
1 answer
WinAPI EM_STREAMOUT crash
I'm trying to get the text of a Richedit Control from another program.
So I found EM_STREAMOUT for SendMessage.
This is my code so far (also from another Stackoverflow topic):
DWORD CALLBACK EditStreamOutCallback(DWORD_PTR dwCookie, LPBYTE…

user3342002
- 11
- 1
1
vote
1 answer
How to remove the RichEdit shortcuts?
As described here, RichEdit controls have a lot of built-in shortcuts for various functions.
I have TRichEdit controls in a Delphi 7 application where I would like to remove some (but probably not all) of those shortcuts. There is no such method…

jedivader
- 828
- 10
- 23
1
vote
1 answer
RichEdit paint background
I know how to change the background on a single row in a TRichEdit control. But because this is applied to the selected text only, I can't set the background color of the whole line (client left to client right), only to the text part.
I tried to…

Max Kielland
- 5,627
- 9
- 60
- 95
1
vote
4 answers
HTML Javascript Rich Text Box (IDE)
I am hoping to build an IDE in javascript that behaves much like gmail except the style will change automatically based on what they type as they type. The logic for this isnt where im struggling. Its how gmail achieves the ability to edit in a rich…

Dested
- 6,294
- 12
- 51
- 73
1
vote
3 answers
How can I append text to the last line of a RichEdit control?
How can I add text not to a new line but to the last existing line? Lines.Add and Lines.Append add text as a new line, and Lines.Insert needs a position that I don't know how to find.

Azad Salahli
- 876
- 3
- 14
- 30
1
vote
2 answers
Richedit change color of selection
I want to add a colored text line to a RichEdit control. But I'm facing the problem that the colorchange isn't limited to the text I selected. What I do is: get current cursor pos -> insert text -> get cursor pos -> select the range -> color it ->…

robin.koch
- 1,223
- 1
- 13
- 20
1
vote
1 answer
Delphi RichEdit find line containing string but not after parentheses
I am trying to get a routine that will find a string that does not follow a parentheses. For instance if the file open in the RichEdit contains these lines of CNC code, I want it to find the first two and ignore the third. In the second line it…

user2662392
- 65
- 2
- 9
1
vote
0 answers
Set Disabled Background and Text Color in RichEdit Control in Delphi
I have developed a custom component derived from a richedit component.
I used the example in PBExEdit created by Peter Below to erase and repaint the background. This is successful in having a different color for the richedit background when…

Barry Watt
- 11
- 1
1
vote
0 answers
Why do I get additional paragraph breaks when I paste into a rich-edit control?
I work with Delphi 2009 on a 64-bit Windows 8 computer and I found that TDBRichEdit and TRichEdit (containing rich text) exhibit a strange and unexpected behaviour when, for instance, I do:
RichEdit1.SelectAll;
RichEdit1.CopyToClipboard; …

gtro
- 65
- 6
1
vote
1 answer
Using Richedit from msftedit.dll in Windows 8
I'm using an extended RichTextBox control in my application to generate RTF documents with embedded images. I'm embedding the images as EMF metafiles with {\pict\wmetafile8\picw[A]\pich[B]\picwgoal[C]\pichgoal[D]...
In Windows XP SP1, Windows…

MCattle
- 2,897
- 2
- 38
- 54
1
vote
2 answers
Sharepoint Rich Content Editor munging HTML added from custom toolbar button
Summary: What I'm trying to ask - are we going about this the completely wrong way, or, is there a way to stop Sharepoint, or its rich editor, from munging the HTML which gets added?
I've been 'dropped' into a project revolving around Sharepoint…

Matthew Savage
- 3,794
- 10
- 43
- 53
1
vote
0 answers
I need getRTF() example for win32 api richedit control
I saw in MSDN that Rich edit control Win 32 API have function to get rich text format that its contents.
http://msdn.microsoft.com/en-us/library/aa247997%28v=vs.60%29.aspx
But in MSDN have no example so that I don't know how to use this function.…

Do Giang
- 11
- 2