|
|
|
Adds a new CProperty to CProperties collection of
a CProperty object.
Syntax
object.Add( ByVal sName As String
Optional aValue As Variant , Optional ByVal sCategory As String , Optional sKey
As String , Optional anobject As object, Optional ByVal bAutoUpdate As Boolean
= True , Optional eEditorType As vlEditorType = vlTextEditor, Optional
sEditorKey As String )
The Add method syntax has these parts:
|
Part | Description |
| object |
An object expression that evaluates to an object of CProperties type. |
| sName |
A property caption text which appears in VLPropertyList. |
| aValue |
Optional. A Variant expression storing the value corresponding to the specified
property. |
| sCategory |
Optional. A string expression which specifies the category of the property
which it belongs to. This value may contain the multiple category names with
CategorySeparator as a separator.
If this parameter is not specified, the property will be added to the category
specified by DefaultCategory
property of the VLProperty control.
|
| sKey |
Optional. A string expression which uniquely identifies this property in the
collection. |
| anobject |
Optional. An object expression specifies the object to which the property value
changes should be applied. Changed value of property will be applied to
this object only if AutoUpdate is set to
True |
| bAutoUpdate |
Optional. A boolean expression specifies whether the change in property's value
should be applied to the object specified by anobject parameter. |
| eEditorType |
Optional. An integer specifying the type of editor to use for editing of the
property in the VLPropertyList , as described in Settings. |
| sEditorKey |
Optional. A string expression idetifying the custom editor to be used with the
property being added. VLPropertyList control will use this
value only when the editor type is set to either vlCustomEditor. |
On successful addition of the property, method returns the newly added
CProperty object.
Settings
The settings for eEditorType are:
|
Constant |
Setting |
Description |
vlTextEditor |
0 |
(default) Editor will be a TextBox. |
vlNumberEditor |
1 |
Editor will be a TextBox which will accept only numbers. |
vlColorEditor |
2 |
Editor will be drop-down color picker. |
vlFontEditor |
3 |
Editor will be a font selection dialog. |
vlDateEditor |
4 |
Editor will be a drop-down date picker. |
vlFileEditor |
5 |
Editor will be a file selection dialog. |
vlListEditor |
6 |
Editor will be a drop down listbox. |
vlCustomDialog |
7 |
Editor will be a Custom Dialog. VLPropertyList
control will trigger ShowEditorDialog event
when user attempts to edit the value of this property |
vlCustomEditor |
8 |
When eEditorType is specified as vlCustomEditor, user must
register his custom editor using RegisterEditor and identify the particular custom editor to be used through sEditorKey
parameter. |
Remarks
The combination of property name and corresponding category name should be
unique.
|