How to create line with different parts (bold, coloured etc.) without AddText?

General TRichView support forum. Please post your questions here
Post Reply
klinikaxp
Posts: 1
Joined: Fri Oct 01, 2010 5:59 pm
Location: Poland

How to create line with different parts (bold, coloured etc.) without AddText?

Post by klinikaxp »

I used it to generate line, which has some parts in different format, for example:

(R : TCustomRichView)

with R do
begin
AddText ('This is ', RED_NORMAL_STYLE);
AddText ('VERY IMPORTANT NUMBER', BOLD_STYLE);
AddTextNL (' and here is the rest of sentence.', NORMAL_STYLE, 0,0);
end;

The effect was following:

This is VERY IMPORTANT NUMBER and here is the rest of sentence.

In version 17.5 AddText method is not available.
How can I create the line/paragraph containing different formatting?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: How to create line with different parts (bold, coloured etc.) without AddText?

Post by Sergey Tkachenko »

AddTextNL ('This is ', RED_NORMAL_STYLE, 0, 0);
AddTextNL ('VERY IMPORTANT NUMBER', BOLD_STYLE, -1, 0);
AddTextNL (' and here is the rest of sentence.', NORMAL_STYLE, -1, 0);
Post Reply