How to Add string with right alignment

General TRichView support forum. Please post your questions here
Post Reply
Till

How to Add string with right alignment

Post by Till »

I want to add string into the table. And I need to set a proper alignment. I do it this way:

Code: Select all

table.Cells[2,1].AddNL('My string',1,0);
As you see, ParaNo differs from -1, that's why my string is placed on the next line and the first line is empty. But how to place my string on the first line with proper alignment?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1) Each cell initially contains one empty string. So call table.Cells[2,1].Clear; before adding text.
2) The last parameter of AddNL is an index of item in RVStyle.ParaStyles collection. Pass the index of item having the proper value of Alignment property.
Till

Post by Till »

Thanks
1) It's the solve for my problem
2) I already know this
:D
Post Reply