objectcaption TrvActionInsertCaption

Properties   Methods

<< Click to display table of contents >>

objectcaption TrvActionInsertCaption

Properties   Methods

TrvActionInsertCaption is the action for "Insert Object Caption..." command.

Unit RichViewActions;

Syntax

TrvActionInsertCaption = class(TrvActionInsertNumSequence)

hmtoggle_arrow1Hierarchy

Description

By default, this action allows inserting captions for pictures, "hot pictures" and tables. You can allow captions for additional items using OnCanApply event.

This action displays a dialog window allowing to enter caption for the object at the caret position.

The caption consists of the following parts:

label

"numbered sequence" item (name of its sequence=label)

'. ' string

used-defined text

Example: Figure 1. Population dynamics of green zebras

If UseStyleTemplates=True for the target editor, this caption is formatted using 'caption' style template. Otherwise, the current text style is used.

The following caption properties are supported:

label (equal to a sequence name);

numbering type (decimal, lower Roman, etc.);

exclude label or not?

caption text

insert above or below?

If UseDefaults=True, the dialog is initialized with a label 'Figure' (localized string), a decimal numbering type, ExcludeLabel and InsertAbove properties.

When the user clicks the "Insert" button, a caption is inserted above or below the selected object, UseDefaults is reset to False, and chosen values are stored in SeqName, NumberType, ExcludeLabel and InsertAbove properties (they are used to initialize a dialog when it will be displayed for the next time).