Page 1 of 1

Table.Cells[j,i].AddNL

Posted: Thu Dec 15, 2022 10:42 pm
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

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

Posted: Fri Dec 16, 2022 10:59 am
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

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

Posted: Mon Dec 26, 2022 10:44 am
by fara2000
I did not noticed that you have replied to me.
Thank you very much indeed.
And merry charismas