Page 1 of 1
					
				How to get natural paragraph content?
				Posted: Thu May 16, 2024 8:31 am
				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.
			 
			
					
				Re: How to get natural paragraph content?
				Posted: Thu May 16, 2024 8:48 pm
				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 
			
					
				Re: How to get natural paragraph content?
				Posted: Fri May 17, 2024 1:27 am
				by wolf1860
				Got it:) Thank u!