[英]DataGridView change cursor selected row
我該如何更改光標箭頭。 我有10列,我想在第一列上更改光標。
如果您依賴CellMouseEnter
事件,則可以輕松獲得所需的內容。 在這里,您具有DataGridView1
和第1列的工作代碼:
Private Sub DataGridView1_CellMouseEnter(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellMouseEnter
If (e.ColumnIndex = 0) Then
Cursor = Cursors.Hand 'Different cursor when the mouse is over a cell belonging to column 1
Else
Cursor = Cursors.Default
End If
End Sub
如果index = firstColumn,則
光標= Cursors.hand
萬一
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.