How to get natural paragraph content?

General TRichView support forum. Please post your questions here
Post Reply
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

How to get natural paragraph content?

Post by wolf1860 »

I need edit every natural paragraph content,for example,insert some chectpoint or some special images and so on.The question is how can I get the natural paragraph's content? such as item count,start item index,end item index...
Thanks.
Sergey Tkachenko
Site Admin
Posts: 17351
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: How to get natural paragraph content?

Post by Sergey Tkachenko »

Items in TRichView are numbered from 0 to rv.ItemCount-1.
If rv.IsParaStart(i)= True, this item starts a paragraph.
So, a paragraph is a range of item starting from the item that has IsParaStart() = True (including), and ending at the next such an item (excluding).
To get a type of the i-th item, use rv.GetItemStyle(i). Next, use Get*** methods specific for the item type.

Some items may be tables. Tables have cells. Cell is a subdocument containing its own items.
See this topic for information how to enumerate all items, including items in cells: https://www.trichview.com/help/controls ... items.html
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: How to get natural paragraph content?

Post by wolf1860 »

Got it:) Thank u!
Post Reply