Table.Cells[j,i].AddNL

General TRichView support forum. Please post your questions here
Post Reply
fara2000
Posts: 42
Joined: Mon Sep 07, 2015 5:59 pm

Table.Cells[j,i].AddNL

Post by fara2000 »

Hello Sergey
I am using Table.Cells[j,i].AddNL('Hello',8) to write 'Hello' as the first Item in a cell of table.
with StyleNo= 8....
How can I control by code the size and the color of the 'Hello' word
Please save me a lot of time and tell me how to do that
Thanks in advance
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Table.Cells[j,i].AddNL

Post by Sergey Tkachenko »

If StyleNo parameter = 8, this text uses text properties defined in RVStyle.TextStyles[8], including FontName, Color and Size.
See https://www.trichview.com/help/idh_class_tfontinfo.html

Two approaches are possible,
1. If your document uses a fixed set of text formatting, you can add all necessary items in RVStyle.TextStyles and use their indexes.
2. You can add necessary item in RVStyle.TextStyles when necessary. See two attached examples in this topic: viewtopic.php?f=2&t=8537
fara2000
Posts: 42
Joined: Mon Sep 07, 2015 5:59 pm

Re: Table.Cells[j,i].AddNL

Post by fara2000 »

I did not noticed that you have replied to me.
Thank you very much indeed.
And merry charismas
Post Reply