VLPropertyList Reference

Read/Write PropertyAddingProperty

See Also See Also Applies To Applies To

This event is triggered before adding a new property to the control.

 

Syntax

Private Sub object_AddingProperty(ByVal sName As String, sCatName As String, eEditorType As vlEditorType, bCancel As Boolean)

 

The AddingProperty event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies to list.
sName A string which specifies the name of the property.
sCatName A string which specifies The category of the property.
eEditorType An interget value which specifies the editor type of the property.
bCancel A boolean expression using which use can cancel the addition of this property.

 

Remarks

When properties are added through LoadObjectProperties or LoadRecordset, the control automatically determines the editor type and category name for the properties.

This event provides you an opportunity to override the category and editor type information determined by the control, even before the property object is actually created. Also, it provides an opportunity to altogether cancel creation of the property object.

For example, during property creation using LoadRecordset, you may not want to create a property corresponding to an ID field, in such a situation, you may want to simply cancel creation of the property object corresponding to ID field by setting bCancel to True.