ImageEn, unit imageenview




property AutoToolbars: TIEViewModes;


Enables toolbars which display automatically when relevant.

The following toolbars are available:
- Image Editing Toolbar
- Image Selection Toolbar
- Image Viewing Toolbar
- Layer Editing Toolbar
- Layer Selection Toolbar
- PDF Editing Toolbar
- PDF Viewing Toolbar

Only one toolbar is displayed at a time. Preference is decided as follows:
- PDF Editing Toolbar: If ievPdfEditing is included
- PDF Viewing Toolbar: If ievPdfViewing is included
- Layer Selection Toolbar: If ievLayerSelection is included and a layer is selected
- Image Selection Toolbar: If ievSelection is included and the image is selected
- Layer Editing Toolbar: If ievLayerEditing is included
- Image Editing Toolbar: If ievEditing is included
- Image Viewing Toolbar: If ievViewing is included

It is generally used in one of the following configurations:
- Image Viewing: ImageEnView1.AutoToolbars := [ ievViewing ];
- Image Editing: ImageEnView1.AutoToolbars := [ ievEditing, ievSelection ];
- Layer Editing: ImageEnView1.AutoToolbars := [ ievLayerEditing, ievLayerSelection ];
- PDF Viewing: ImageEnView1.AutoToolbars := [ ievPdfViewing ];
- PDF Editing: ImageEnView1.AutoToolbars := [ ievPdfEditing ];

Default: [] (No hover toolbars)

- To embed the toolbar rather than have it hover, use a TImageEnViewToolbar
- The toolbar is only displayed when the TImageEnView is the active control
- To control the hover toolbar for editing a rich text layer, use loShowRichTextToolbar of LayerOptions
- Delphi 2006 and older: Hover toolbars should only be used on the main form. On secondary forms the toolbar may stay in front of other applications


Demo  Demos\Other\ImageEnViewToolbar\IEToolbar.dpr
Demo  Demos\Other\PdfViewerToolbar\PdfViewerToolbar.dpr


// Display toolbar with buttons relevant to viewing images
ImageEnView1.AutoToolbars := [ ievViewing ];

// Display toolbar with buttons relevant to editing images. If a selection is made the toolbar changes to selection related methods
ImageEnView1.AutoToolbars := [ ievEditing, ievSelection ];

// Only display a toolbar when the image is selected
ImageEnView1.AutoToolbars := [ ievSelection ];

// Display toolbar with buttons relevant to editing layers. If a layer is selected the toolbar changes to methods for the selected layer
ImageEnView1.AutoToolbars := [ ievLayerEditing, ievLayerSelection ];

// Show only zoom, seek and print buttons at top of TImageEnView
IEGlobalSettings().ImageViewingToolbar.Buttons := [ ivbImageSeek, ivbImagePrint, ivbImageZoom ];
IEGlobalSettings().ImageViewingToolbar.Position := iepAbove;
ImageEnView1.AutoToolbars := [ ievViewing ];

// When the image is selected, show clipboard buttons beneath the selection
IEGlobalSettings().ImageSelectionToolbar.Buttons := [ ivbImageClipboard ];
IEGlobalSettings().ImageSelectionToolbar.Position := iepBelowSelection;
ImageEnView1.AutoToolbars := [ ievSelection ];

// When a layer is selected, show style controls beneath
IEGlobalSettings().LayerSelectionToolbar.Buttons := [ ivbImageClipboard ];
IEGlobalSettings().LayerSelectionToolbar.Position := iepBelowSelection;
ImageEnView1.AutoToolbars := [ ivbLayersStyle, ivbLayersProps ];