This was a copy and paste error in the code. Attempting to get the ItemNumber actually caused the Image of the node to be set to the ItemNumber. The same problem occurred for ItemData. |
Getting .ItemNumber from a cTreeViewNode fails, for some reason. Set works fine.
Code snippet:
For j = 1 To CVCameras(mServer(1).SvrHandle)
Set nodSubSub = subChildren.Add(, etvwChild, j, CVCameraName(mServer(1).SvrHandle, j))
Set nodSubSub = subChildren.Item(j)
nodSubSub.ItemNumber = Rnd * 15
TotalAlarms = TotalAlarms + nodSubSub.ItemNumber
Next j
nodSub.ItemNumber = TotalAlarms
|