How can I get one specific line to be bold in a RichEdit?
Asked
Active
Viewed 3,614 times
1 Answers
5
Formatting in a rich edit control is done like this:
- Select the text to which formatting is to be applied.
- Apply that formatting to the selection.
It goes something like this:
RichEdit1.SelStart := SelectionStart;
RichEdit1.SelLength := SelectionLength;
RichEdit1.SelAttributes.Style := RichEdit1.SelAttributes.Style + [fsBold];
Of course, you have to work out what to use in place of SelectionStart
and SelectionLength
. Ultimately that comes down to how you are managing the text and I don't think there's enough information in the question to give you a single definitive answer on that topic.

David Heffernan
- 601,492
- 42
- 1,072
- 1,490