This event is generated when the mouse cursor is inside the image and the mouse button has been pressed
Parameters
Name | Explanation |
---|---|
Button | The type of button clicked mbLeft: Left Button mbRight: Right Button mbMiddle: Middle Button |
Shift | The state of the key or mouse button ssShift: Shift key is pressed ssAlt: Alt key is pressed ssCtrl: Ctrl key is pressed ssLeft: Left mouse button is pressed ssRight: Right mouse button is pressed ssMiddle: Middle mouse button is pressed ssDouble: Mouse has been double clicked |
OriginX | The horizontal distance from the left side of the
ImageKit Control to the left side of the image. (If the image is larger than the ImageKit Control in the horizontal direction, OriginX will equal 0.) |
OriginY | The vertical distance from the top of the ImageKit
Control to the top of the image. (If the image is larger than the ImageKit Control in the vertical direction, OriginY will equal 0.) |
ALeft | The horizontal distance from the left side of the actual image to the left side of that portion of the image currently being displayed. |
ATop | The vertical distance from the top of the actual image to the top of that portion of the image currently being displayed. |
ARight | The horizontal distance from the left side of the actual image to the right side of that portion of the image currently being displayed. |
ABottom | The vertical distance from the top of the actual image to the top of that portion of the image currently being displayed. |
ScaleWidth | The horizontal scale between the displayed portion of the image and the actual image. |
ScaleHeight | The vertical scale between the original image and the displayed image. |
x, y | The coordinates on the image where the mouse button was pressed. |
The values are in pixels.
Explanation
The MouseDownImage event is generated when the mouse cursor is inside the image and the mouse button has been pressed. This event is enabled when a valid image handle is set in the ImageHandle property or the Layer(LayerNo).ImageHandle property.
Note: The MouseDownImage event is generated before the standard MouseDown event.
The OriginX parameter and the OriginY parameter depend on the values set in the BorderVisible, Appearance, and Grad properties.
For more information about the TMouseButton type and the TShiftState type, please refer to the Delphi or C++Builder help documentation.
Differences from ImageKit7/8/9/10 ActiveX
The Button parameter has been changed to the TMouseButton
type
The Shift parameter has been changed to the TShiftState type