GET LIST ITEM ICON

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11


GET LIST ITEM ICON ({*; }list; itemRef | *; icon)

ParameterTypeDescription
**If specified, list is an object name (string)
If omitted, list is a list reference number
listListRef | StringList reference number (if * omitted) or
Name of list type object (if * passed)
itemRef | *Longint | *Item reference number or
0 for the last item added to the list or
* for the current item of the list
iconPicture varIcon associated with item

Description

The GET LIST ITEM ICON command returns, in icon, the icon associated with the item whose eference number is passed in itemRef in the list whose reference number or object name is passed in list.

If you pass the first optional * parameter, you indicate that the list parameter is an object name (string) corresponding to a representation of the list in the form. If you do not pass this parameter, you indicate that the list parameter is a hierarchical list reference (ListRef). If you only use a single representation of the list or work with structural items (the second * is omitted), you can use either syntax. Conversely, if you use several representations of the same list and work with the current item (the second * is passed), the syntax based on the object name is required since each representation can have its own current item.

Note: If you use the @ character in the object name of the list and the form contains several lists that match this name, the GET LIST ITEM ICON command will be applied to the first object whose name corresponds.

You can pass a reference number in itemRef. If this number does not correspond to an item in the list, the command does nothing. You can also pass 0 in itemRef to indicate the last item added to the list (using APPEND TO LIST).

Lastly, you can pass * in itemRef: in this case, the command will apply to the current item of the list. If several items are selected manually, the current item is the one that was selected last. If no item is selected, the command does nothing.

Pass a picture variable in icon. After the command is executed, it will contain the icon associated with the item, regardless of the source of the icon (static picture, resource or picture expression).

If no icon is associated with the item, the icon variable is returned empty.

Note: When the icon associated with an item has been defined via a static reference (resource references or pictures from the picture library), it is possible to find out its number using the GET LIST ITEM PROPERTIES command.

See Also

GET LIST ITEM PROPERTIES, SET LIST ITEM ICON.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next