picture TrvActionInsertPicture

Properties   Methods   Events

<< Click to display table of contents >>

picture TrvActionInsertPicture

Properties   Methods   Events

TrvActionInsertPicture is the action for "Insert | Picture" command.

Unit RichViewActions;

Syntax

TrvActionInsertPicture = class(TrvActionCustomIO)

hmtoggle_arrow1Hierarchy

Description

This action inserts pictures from files at the caret position. Unlike all other file opening actions, this action detects file format by the file extension, not by the file filter index.

 

The action calls GetControlPanel.OnChoosePicture event (if assigned). If the event provides an image, the action inserts it.

Otherwise, the action displays TOpenPictureDialog to choose pictures. The action allows users to select more than one file in the dialog. Then it inserts chosen files one by one.

 

The following additional properties can be applied to inserted pictures:

VAlign – the image alignment relative to text;

Spacing – padding (spacing between the image itself and its border);

OuterHSpacing, OuterVSpacing – horizontal and vertical spacing around the image border;

BorderWidth, BorderColor – border width and color;

BackgroundColor – background color;

MaxImageSize – maximal allowed size (the image will be stretched if it exceeds this size);

StoreFileNameInItemName allows storing file name with the image (It's not recommended to use this option. The recommended place for storing image file names is rvespImageFileName extra item property. It is assigned if rvoAssignImageFileNames is included in the Options property of the target editor).

You can modify a picture before insertion in OnInserting event.