VLPropertyList Reference

MethodRegisterEditor

See Also See Also Applies To Applies To

The method allows to add new custom editors and use it to edit the property values.

 

Syntax

object.RegisterEditor(ByVal Key As String,ByVal anEditor As CEditor) As Boolean

 

The RegisterEditor method syntax has these parts:

PartDescription
object An object expression that evaluates to a VLPropertyList.
Key An unique string expression that identifies the custom editor.
anEditor An object which implements the interface CEditor.

 

Remarks

The editor passed to this method must implement CEditor interface. The Key value must be unique. Registered editors must unregistered using UnRegisterEditor method.  The following code registers an editor and shows how to use it with a property:

Class MyEditor:

Option Expicit
Implements CEditor
                        '
            '
In the application:

Dim sKey As string
Dim aMyEditor As New MyEditor
Dim aProperty As CProperty

sKey = "MyEditor"
VLPropertyList1.RegisterEditor(sKey, aMyEditor)

set aProperty = VLPropertyList1.Properties.item(1)

If (Not aProperty Is Nothing) Then
	aProperty.EditorType = VLEditorType.vlCustomEditor
	aProperty.EditorKey = sKey
End If
           '
            '
            '