ImageEn, unit iexToolbars

TImageEnViewToolbar


Declaration

TImageEnViewToolbar = class(TCustomImageEnToolbar);


Description

A descendent of TToolbar that provides a toolbar to control a TImageEnView.
Buttons are available for opening, saving, editing, clipboard, zooming, mouse actions and tools. You can add your own buttons using OnAddCustomButton.
To customize the state handling of buttons, use OnActionUpdate. To change what happens when buttons are clicked, use OnActionExecute.


The toolbar when VCL theming is enabled:


Note:
If you want an automatic toolbar that hovers over the TImageEnView, use AutoToolbars
To use the toolbar in a DLL, you must enable EnableDLLMode


Demos

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


Examples

// Show image editing buttons on the toolbar
ImageEnViewToolbar1.AttachedImageEnView := ImageEnView1;
ImageEnViewToolbar1.Buttons := [ ivbImageOpen, ivbImageSave, ivbImageZoom, ivbImageClipboard, ivbMouseZoomAndScroll, ivbMouseSelect, ivbImageEditRotate, ivbImageEditFlip, ivbImageEditOther, ivbImageEditDialogPreview, ivbImageEditColors, ivbImageEditColorPreview, ivbImageEditTools, ivbImageEditUndo ];

// Which is the same as...
ImageEnViewToolbar1.AttachedImageEnView := ImageEnView1;
ImageEnViewToolbar1.Buttons := [];
ImageEnViewToolbar1.ButtonMode := ievImageEditing;

// Make toolbar buttons green
ImageEnViewToolbar1.ImageHue := -100;


General

Published Property  AttachedImageEnView
Published Property  AutoScale
Published Property  ButtonMode
Published Property  Buttons
Published Property  ImageHue
Published Property  KeyboardShortcuts
Published Property  Scaling
Published Property  UpdateButtons
Published Property  WideToolbar


Events

Event  OnActionExecute
Event  OnActionUpdate
Event  OnAddButton
Event  OnAddButtonImage
Event  OnAddCustomButton