TIEView.MouseWheelParams
Declaration
property MouseWheelParams: TIEMouseWheelParams;
Description
MouseWheelParams and
MouseWheelParamsAlt allow you to customize the behavior of the mouse wheel.
MouseWheelParams is used to specify the default mouse wheel behaviour, whereas
MouseWheelParamsAlt is used when the Ctrl key is pressed.
Note: If
MouseWheelParamsAlt is iemwNone, then it has the same effect as
MouseWheelParamsTImageEnView DefaultsAction: iemwZoom
ZoomPosition: iemwCenter
Variation: iemwPercentage
Value: 8
InvertDirection: False
TImageEnMView DefaultsAction: iemwVScroll
Variation: iemwPercentage
Value: 8
InvertDirection: False
| Demos\Other\MouseWheel\MouseWheelParams.dpr |
| Demos\Multi\MView_AttachedViewer\MViewPreview.dpr |
ImageEnView Examples
// Mouse wheel will scroll image by 15% of component height
ImageEnView1.MouseWheelParams.Action := iemwVScroll;
ImageEnView1.MouseWheelParams.Variation := iemwPercentage;
ImageEnView1.MouseWheelParams.value := 15;
// Mouse wheel will scroll image 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 and spinning the mouse wheel
IEFolderMView1.AttachedImageEnView := ImageEnView1;
ImageEnView1.ShowButtons := [ iebtPrevious, iebtNext ];
ImageEnView1.MouseWheelParams.Action := iemwNavigate;
ImageEnMView1.MouseWheelParams.Action := iemwNavigate;
ImageEnMView Examples
// 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;
// Invert the direction to resemble that of Windows Explorer
ImageEnMView1.MouseWheelParams.InvertDirection := True;
See Also
◼MouseWheelParamsAlt