|pMe||(Object) Reference to the graphic item where the event rises.|
|pEvent||(Object) A referrence to object describing detailed information about the specific event.|
pEvent.Action - (Long) Action type over the left mouse button.
0 - releasing the left mouse button
1 - pressing the left mouse button
2 - double-clicking the left mouse button
pEvent.Shift - (Boolean) Indication of concurrent pressing the Shift key.
pEvent.Alt - (Boolean) Indication of concurrent pressing the Alt key.
pEvent.FocusIn - (Boolean) Identification whether the item gained focus by pressing.
false - The item had focus before pressing.
true - The item gained focus by this pressing.
pEvent.X - (Long) X-axis position of the mouse cursor relatively to the upper-left corner of the item (in pixels). For items with border (see the configurator "Border - width") the position is counted from this border (i.e. when clicking into the left outline the X coordinate is negative).
pEvent.Y - (Long) Position of the mouse cursor in the Y-coordinate relatively to the left upper corner of the item (in pixels). For items with border (see the configurator "Border - width") the position is counted from this border (i.e. when clicking into the upper portion of the frame, the Y coordinate is negative).
Caution 1: It is always necessary to check the pEvent.Action property (see Example). If it wasn't checked, then the script in the onMousePress event would be called twice because when the user presses or releases the mouse button, then the onMousePress event fires twice but always with the different pEvent.Action parameter.
Caution 2: It is NOT advisable to place methods that call another window on the workspace (e.g. Pm.InputBox, etc.), into the script when the pEvent.Action=1 action is treated. If such method is used, it can result in the consequently NOT calling the pEvent.Action=0 action. Scripts that call other windows must be places into the treatment of the 0 action value.
If pEvent.Action = 0 Then
' do something when the mouse button is released
If pEvent.Ctrl Then
' if moreover the Ctrl key has been pressed, do even something more