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?
How to create line with different parts (bold, coloured etc.) without AddText?
-
- 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?
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);
AddTextNL ('VERY IMPORTANT NUMBER', BOLD_STYLE, -1, 0);
AddTextNL (' and here is the rest of sentence.', NORMAL_STYLE, -1, 0);