GridCellMouseEventArgs

MouseEventArgsEventArgsReferences
Event arguments for cell-based events of a Grid triggered by the mouse.

Constructors

GridCellMouseEventArgs

#
public GridCellMouseEventArgs(GridColumn gridColumn, int row, int column, object item, MouseButtons buttons, Keys modifiers, PointF location, SizeF? delta = null, float pressure = 1)
Initializes a new instance of the GridCellMouseEventArgs class.
gridColumn (GridColumn)Grid column that triggered the event.
row (int)The row that triggered the event, or -1 if no row.
column (int)Column that triggered the event, or -1 if no column.
item (object)Item of the row that triggered the event, or null if no item.
buttons (MouseButtons)Mouse buttons that are pressed during the event
modifiers (Keys)Key modifiers currently pressed
location (PointF)Location of the mouse cursor in the grid
delta (SizeF? = null)Delta of the scroll wheel.
pressure (float = 1)Pressure of a stylus or touch, if applicable. 1.0f for full pressure or not supported

Properties

Column

#
public int Column { get; }
Gets the index of the column that triggered the event, or -1 if no column.

Delta

public SizeF Delta { get; }
Gets or sets the delta change of the scroll wheel for the event.
inherited fromMouseEventArgs

GridColumn

#
public GridColumn GridColumn { get; }
Gets the grid column that triggered the event.

Handled

public bool Handled { get; set; }
Gets or sets a value indicating whether the event is handled.
inherited fromMouseEventArgs
Remarks: Set this to true if you perform logic with the event and wish the default event to be cancelled. Some platforms may cause audio feedback if the user's action does not perform anything.
true if handled; otherwise, false.

IsDirectionInverted

public bool IsDirectionInverted { get; }
Gets a value indicating that the MouseEventArgs.Delta is inverted from the direction of the physical device.
inherited fromMouseEventArgs
Remarks:

This is true when the user has turned on natural (or reverse) scrolling for the device that generated the event, in which case the platform has already flipped the MouseEventArgs.Delta so that the content follows the user's fingers. Use this when you need to move something with the device instead of with the content, such as panning a canvas with a two finger scroll.

Only wheel events report this, and only on platforms that expose the setting per event (currently macOS via NSEvent.isDirectionInvertedFromDevice). Elsewhere this is always false, as the platform gives no way to tell an inverted delta from a regular one.

true if the delta is inverted from the device; otherwise, false.

Item

#
public object Item { get; }
Gets the item of the row that triggered the event, or null if there was no item.

Location

public PointF Location { get; }
Gets the location of the mouse relative to the control that raised the event.
inherited fromMouseEventArgs

Pressure

public float Pressure { get; }
Gets or sets the pressure of the mouse/stylus press, if applicable. 1.0 if full pressure or not supported.
inherited fromMouseEventArgs

Row

#
public int Row { get; }
Gets the row that triggered the event, or -1 if no row.