IDataGridViewEditingControl.EditingPanelCursor Property

Definition

Gets the cursor used when the mouse pointer is over the EditingPanel but not over the editing control.

public:
 property System::Windows::Forms::Cursor ^ EditingPanelCursor { System::Windows::Forms::Cursor ^ get(); };
public System.Windows.Forms.Cursor EditingPanelCursor { get; }
member this.EditingPanelCursor : System.Windows.Forms.Cursor
Public ReadOnly Property EditingPanelCursor As Cursor

Property Value

A Cursor that represents the mouse pointer used for the editing panel.

Examples

The following code example provides an implementation of this member. This example is part of a larger example available in How to: Host Controls in Windows Forms DataGridView Cells.

// Implements the IDataGridViewEditingControl
// .EditingPanelCursor property.
public Cursor EditingPanelCursor
{
    get
    {
        return base.Cursor;
    }
}
Public ReadOnly Property EditingControlCursor() As Cursor _
    Implements IDataGridViewEditingControl.EditingPanelCursor

    Get
        Return MyBase.Cursor
    End Get

End Property

Remarks

The editing panel is the Panel that hosts the editing control when the DataGridView control is in edit mode. The actual editing control may not cover the entire area of the editing panel. In this case, the EditingPanelCursor implementation should return the cursor to use when the mouse pointer is over the panel but not over the control. Typically, you will want to return the same cursor that the control uses. If you want to change the cursor that appears when the pointer is over the control, you must set the Cursor property. You can set this in the constructor of the IDataGridViewEditingControl implementation, or you can set it in the PrepareEditingControlForEdit implementation.

Applies to

See also