|
SharpGrid provides users with the ability to customize ToolTip text. In the attached sample, the FetchCellTip event is used to change the ToolTip for each row in the grid.
Option Explicit
Private Sub Form_Load()
With SGGrid1
.Columns.RemoveAll False
.DataColCount = 5
.DataRowCount = 10
'Set tip to float
.CellTips = sgCellTipsFloat
'Set tip delay
.CellTipsDelay = 300
'Turn on row numbering
.RowNumbering = True
End With
End Sub
Private Sub SGGrid1_FetchCellTip(ByVal RowKey As Long, ByVal ColIndex As Long, ByVal CellKind As DDSharpGridOLEDB2.sgCellKind, Width As stdole.OLE_XSIZE_CONTAINER, Height As stdole.OLE_YSIZE_CONTAINER, CellTipText As String, Picture As Variant, ByVal TipStyle As DDSharpGridOLEDB2.IsgStyle)
'Display celltips for each row
CellTipText = "Row position: " & SGGrid1.Rows(RowKey).Position
End Sub
The link below contains additional information about the use of the FetchCellTip event. The attached sample demonstrates how to change the tip for each row in SharpGrid.
FetchCellTip Event
If you have any questions or need assistance, please feel free to submit a support request.
Applies To: SharpGrid 2.0
|