windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawheadereventargsbase-637ebce4.md
Gets whether a mouse is currently over the worksheet header.
Namespace : DevExpress.XtraSpreadsheet
Assembly : DevExpress.XtraSpreadsheet.v25.2.dll
NuGet Package : DevExpress.Win.Spreadsheet
public bool IsHovered { get; }
Public ReadOnly Property IsHovered As Boolean
| Type | Description |
|---|---|
| Boolean |
true if a row or column header is hovered over with a mouse; otherwise, false.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsHovered property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-spreadsheet-custom-draw-example/CS/WindowsFormsApp1/Form1.cs#L172
if (e.ColumnIndex <= 4) {
var backColor = e.IsHovered || (e.ColumnIndex == spreadsheetControl1.ActiveCell.ColumnIndex) ?
//Color 1
winforms-spreadsheet-custom-draw-example/VB/CustomDrawExample/Form1.vb#L67
If e.ColumnIndex <= 4 Then
Dim backColor = If(e.IsHovered OrElse (e.ColumnIndex = spreadsheetControl1.ActiveCell.ColumnIndex),
Color.FromArgb(200, 44, 74), 'Color 1
See Also
CustomDrawHeaderEventArgsBase Class