Working with the 'CEL' objects

Working with the 'CEL' objects

The CEL Object represents the "Chronologival Event List" an offers the feature to write user defined Events into the list or react on entries in the list...
'##########################################################
'### this Code can be used within the 'thisProject' ###
'### object class, because of the project events! ###
'##########################################################
'Declare Objects to get the Events...
Dim WithEvents zCEL As Cel
Dim WithEvents zCELPIC As DynPicture
Dim bCEL As Boolean
'##########################################################
'### Project Events - START/END of the zenOn Runtime ###
'##########################################################
Private Sub Project_Active()
'Init picture pbjects to get Open/Close events of the pictures
Set zCELPIC = thisProject.DynPictures.Item("CEL")
End Sub
Private Sub Project_Inactive()
'release objects
Set zCELPIC = Nothing
End Sub
'##########################################################
'### Procedures/Events for the Chronological event list ###
'##########################################################
Private Sub zCELPIC_Open()
'boolen flag to remember the open event
bCEL = True
'init CEL Object to get the CelListSelectionChanged event
Set zCEL = thisProject.Cel
End Sub
Private Sub zCELPIC_Close()
'release object
Set zCEL = Nothing
End Sub
Private Sub zCEL_CelListSelectionChanged(ByVal obItem As ICelItem)
'If the boolen is TRUE, the first events can be ignored
'because in this case the events returns the default
'selection on opening the picture
If bCEL = True Then
bCEL = False
Else
Debug.Print "C_Changed - " & obItem.Text
End If
End Sub


This is a migrated post! Originally posted on 16.08.2007 by user robertf. Please be aware that information can be outdated.