Purpose
Returns information about a selected item in the Layer Control window.
Syntax
LayerControlSelectionInfo( selection_index, attribute )
selection_id is the index of a selected item in Layer Control.
attribute is a code indicating the type of information to return; see table below.
Description
The attribute parameter can be any value from the table below. Codes in the left column are defined in MAPBASIC.DEF.
attribute code | ID | LayerControlSelectionInfo() returns |
---|---|---|
LC_SEL_INFO_NAME | 1 | String result, representing the name of the selected item. |
LC_SEL_INFO_TYPE | 2 | Smallint result, indicating the type of selected item. Return value will be one of the values:
|
LC_SEL_INFO_MAPWIN_ID | 3 | Integer value, representing the window id of the mapper associated with the selected item. |
LC_SEL_INFO_LAYER_ID | 4 | Smallint value, indicating the ID of the layer associated with the selected item. If you query this value when a map item is selected, the return value is -1. For a theme category item, this is the layer ID for the theme layer. |
LC_SEL_INFO_OVR_ID | 5 | Smallint value, indicating the index of the override associated with the selected item. If you query this value when a map, layer, grouplayer or theme category item is selected, the return value is -1. |
Example
LayerControlSelectionInfo(layer_number, LC_SEL_INFO_NAME)
See Also:
LayerControlInfo() function