![]() | Type | Description | ||
| Group as Group | A Group object where the cell needs to be formatted | |||
| Item as HITEM | A long expression that indicates the handle of the item being formatted. | |||
| ColIndex as Long | A long expression that indicates the index of the column being formatted. | |||
| Value as Variant | A Variant value that indicates the value being formatted. By default, the Value parameter has the CellCaption value. |
The following sample uses the FormatCurrency function provided by the VB to display numbers as currency:
Private Sub ExplorerTree1_FormatColumn(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Item As EXPLORERTREELibCtl.HITEM, ByVal ColIndex As Long, Value As Variant)
Value = FormatCurrency(Value)
End Sub
Private Sub Form_Load()
With ExplorerTree1
With .Groups.Add("Group 1")
.BeginUpdate
With .Columns(0)
.FireFormatColumn = True
End With
.PutItems Array(10, 20, 30, 40)
.EndUpdate
End With
End With
End Sub