Skip to main content

TdxRichEditControlInsertTableOfContents Class

An action object that corresponds to the InsertTableOfContents command provided by the Rich Edit control.

Declaration

TdxRichEditControlInsertTableOfContents = class(
    TdxRichEditControlAction
)

Remarks

This class does not introduce any new public members. Executing a TdxRichEditControlInsertTableOfContents action object inserts a table of contents (i.e., a special TOC document field) into the currently active document.

Individual table of contents entries are specially marked paragraphs within the document. You can use the following techniques to mark table of contents entries:

  • Apply heading styles, such as Heading 1, Heading 2 etc. (no TOC field switch is required).
  • SEQ fields (use the \c TOC field switch).
  • TC fields (use the \f TOC field switch).

UI elements linked to a TdxRichEditControlInsertTableOfContents action object are enabled only if the following conditions are met:

  • The Rich Edit control’s ReadOnly property is set to False.
  • The current selection (i.e., the caret or text selection) is not located within the document header or footer.
See Also