FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / C1FlexGrid Class / MouseEnterCell Event

In This Topic
    MouseEnterCell Event (C1FlexGrid)
    In This Topic
    Fires when the mouse enters a cell.
    Syntax
    'Declaration
     
    
    Public Event MouseEnterCell As RowColEventHandler
    public event RowColEventHandler MouseEnterCell
    Event Data

    The event handler receives an argument of type RowColEventArgs containing data related to this event. The following RowColEventArgs properties provide information specific to this event.

    PropertyDescription
    Gets or sets a value indicating whether the operation should be canceled.  
    Gets the index of the column that caused the event.  
    Gets the index of the row that caused the event.  
    Remarks

    Many applications track mouse movement and react to the cell that is currently under the mouse. This can be done using the System.Windows.Forms.Control.MouseMove event, but that is not very efficient since the event fires many times while the mouse is over the same cell.

    The MouseEnterCell event allows you to implement cell tracking efficiently, since it only fires once until the mouse leaves the cell.

    Example
    The code below tracks mouse movement and highlights the cell under the mouse:
    See Also