The ItemList attribute function queries a list of possible values of a variable.
Syntax | ||||
ItemList(ListType) | ||||
Return value | ||||
Variant() | ||||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
ListType |
ItemListTypes |
ByVal |
Type of returned list |
ItemListTypes |
Description |
0 – UsedQualities |
Returns a list of selectable possible values of the variable |
1 – UsedValidQualities |
Returns a list of currently allowed selectable possible values of the variable |
2 – PickList |
Returns a list of defined values of the variable |
Example:
A variable of type String is defined as follows:
The variable has defined possible values:
With these settings
Dim Result() As Variant
Result := Color.ItemList(ItemListTypes.PickList)
…the list variable Result contains the values NoValue, ‘’, ‘Red’, ‘Blue’, ‘Green’
Result := Color.ItemList(ItemListTypes.UsedQualities)
…the list variable Result contains the values ‘Red’, ‘Green’
Result := Color.ItemList(ItemListTypes.UsedValidQualities)
…the list variable Result contains the value ‘Red’