TE Edit Control Java / HTML-JavaScript Help
Product page

TerInsertToc2

Insert table of contents.

boolean TerInsertToc2(TocType, styles,MinLevel, MaxLevel, repaint)
int TocType;The table-of-contents construction method. Use one of the following types:
TOC_HEADINGS:Construct the table-of-contents with the text using the heading styles named following the format 'heading n', where 'n' is a number from 1 to 9.
TOC_OUTLINES:Construct the table-of-contents with the text using the style with a outline level 0 to 8.
TOC_CUSTOM:Construct the table-of-contents with the text using the custom styles specified in the 'styles' parameter.
TOC_FIELD:Construct the table-of-contents with the text using the 'tc' field. The 'tc' field can be applied to the text using the TerSetTcField function.
String styles;

The list of custom styles to use to construct the table of contents. Each style name in this list must be delimited using the comma delimiter.

This parameter is used only when the TocType parameter is set to TOC_CUSTOM.

int MinLevel;The minimum heading level to use.
int MaxLevel;The maximum heading level to use.
boolean repaint;Repaint the window after this operation

Description: This function provides additional flexibility for creating the table-of-contents than the simpler method called TerCreateTej.

The table of contents are automatically updated whenever repagination occurs.

Return Value: This function returns TRUE when successful.