How to find actual number assigned to paragraph

General TRichView support forum. Please post your questions here
Post Reply
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

How to find actual number assigned to paragraph

Post by mboth »

When a paragraph has a auto-number style, how can I programmatically find the number TRichView assigned to it during formatting? I'd need this for table cell content via RVData, too.

I have found TCustomRichView.GetListMarkerInfo(). However this seems to give me the index of a paragraph only, not the complete number composed of all levels of numbering including fill characters (".").

The reason I ask: We want to resolve cross-references to paragraph numbers ("see paragraph 4.3.2") before printing. (Or are they built-in and I did not find them?)

Thanks
Moritz
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It is possible, but not documented.
First, you need to know the index of the list marker item (the first item in the paragraph (ItemNo).
Now you can get the marker object (TRVListMarkerInfo(rv.GetItem(ItemNo))). This object is declared in RVMarker.pas.

It has the following properties (please do not modify them):
Counter (for "4.3.2" it is 2)
DisplayString ('4.3.2')
Post Reply