Hi,
I am using the Rich Text Control and RichEditDocumentServer to generate a TOC for my Report.
As shown in the screenshot I am trying to draw some dots between the TOC entry and the page number given the following code:
C#private static void SetDimensionPagesTabs(RichEditDocumentServer reds, DocumentRange dimensionsRange) {
ParagraphProperties paragraphProps = reds.Document.BeginUpdateParagraphs(dimensionsRange);
paragraphProps.LineSpacingMultiplier = 1;
TabInfoCollection tabInfos = paragraphProps.BeginUpdateTabs(false);
tabInfos.Add(new TabInfo() { Position = 60, Alignment = TabAlignmentType.Left });
tabInfos.Add(new TabInfo() { Position = 130, Alignment = TabAlignmentType.Left });
tabInfos.Add(new TabInfo() { Position = 1800, Alignment = TabAlignmentType.Right, Leader = TabLeaderType.Dots });
tabInfos.Add(new TabInfo() { Position = 1850, Alignment = TabAlignmentType.Right });
paragraphProps.EndUpdateTabs(tabInfos);
reds.Document.EndUpdateParagraphs(paragraphProps);
}
The problemn is that the leader dots do not go all the way to the next tabstop. Am I missing some settings?
What I expected: The dots fill the gap between the text and the "1800" stop.
Sincerely,
Bernd Boruttau
Hi Bernd,
Would you please provide me with code demonstrating how you create a TOC in your document? I will examine this code and do my best to find an appropriate solution.
I look forward to hearing from you.
Attached is an example where the misalignment can be reproduced.
- Dots should fill up to the same "column"
- page numbers should be right aligned behind last tabstop