TIEMouseWheelParams.Action
Declaration
property Action: TIEMouseWheelParamsAction;
Description
Action specifies the task to perform on mouse wheel events.
Value | Description |
iemwNone | Mouse wheel has no effect |
iemwVScroll | Scroll the control up/down |
iemwZoom | Enlarge/Reduce the image (TImageEnView) or thumbnails (TImageEnMView) |
iemwZoomView | In TImageEnMView this cycles through the common display styles and sizes. With TImageEnView it works the same way as iemwZoom |
iemwNavigate | Navigate to the next/previous image. Note: In TImageEnView this is only relevant for images with multiple frames such as TIFFs and GIFs |
TImageEnView default: iemwZoom
TImageEnView default (Alt): iemwNone (i.e. same effect as non-Alt)
TImageEnMView default: iemwVScroll
TImageEnMView default (Alt): iemwZoom
Note: When using iemwZoom, you can limit the bounds of the zoom using
OnZoomIn and
OnZoomOut
// For iemwVScroll used with iemwPercentage, TImageEnMView assumes a theoretical grid of 12.5 thumbnails high
// So the default of 8% will scroll one thumbnail with each wheel click
// Whereas 16% would scroll the height of two thumbnails
ImageEnMView1.MouseWheelParams.Action := iemwVScroll;
ImageEnMView1.MouseWheelParams.Variation := iemwPercentage;
ImageEnMView1.MouseWheelParams.value := 4; // half a thumbnail
// Mouse wheel will navigate to the next or previous image
ImageEnMView1.MouseWheelParams.Action := iemwNavigate;
// Windows Explorer like behavior. Mouse wheel scrolls the control and Ctrl + Mouse wheel changes the thumbnail view
ImageEnMView1.MouseWheelParams.Action := iemwVScroll;
ImageEnMView1.MouseWheelParamsAlt.Action := iemwZoomView;
// Mouse wheel will scroll image of TImageEnView by 15% of component height
ImageEnView1.MouseWheelParams.Action := iemwVScroll;
ImageEnView1.MouseWheelParams.Variation := iemwPercentage;
ImageEnView1.MouseWheelParams.value := 15;
// Mouse wheel will scroll image of TImageEnView by 1 pixel
ImageEnView1.MouseWheelParams.Action := iemwVScroll;
ImageEnView1.MouseWheelParams.Variation := iemwAbsolute;
ImageEnView1.MouseWheelParams.value := 1;
// Attach a TImageEnView to a TImageEnFolderMView and allow navigation by buttons on the TImageEnView. Mouse wheel will either zoom or navigate depending on Ctrl key
IEFolderMView1.AttachedImageEnView := ImageEnView1;
ImageEnView1.ShowButtons := [ iebtPrevious, iebtNext ];
ImageEnView1.MouseWheelParams.Action := iemwZoom;
ImageEnView1.MouseWheelParamsAlt.Action := iemwNavigate;
ImageEnMView1.MouseWheelParams.Action := iemwNavigate;