Page 1 of 1

How to find actual number assigned to paragraph

Posted: Tue Jan 19, 2010 12:08 pm
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

Posted: Tue Jan 19, 2010 1:41 pm
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')