Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomMapControl.Select(TdxMapItem,TShiftState,Boolean) Method

Switches the selected state of a specified map item.

#Declaration

Delphi
procedure Select(AMapItem: TdxMapItem; AShiftState: TShiftState = []; ACheckSelectionMode: Boolean = True);

#Parameters

Name Type
AMapItem TdxMapItem
AShiftState TShiftState
ACheckSelectionMode Boolean

#Remarks

This method modifies the current selection accessible using the SelectedMapItems property.

AMapItem specifies a map item to select. If this map item is already selected and ssCtrl is passed as the AShiftState parameter, the map item is deselected instead.

If True is passed as the ACheckSelectionMode parameter, the Select method takes into account the map control’s OptionsBehavior.MapItemSelectMode property setting, emulating an end-user action:

  • If the property is set to mismNone, the Select method does nothing.

  • If the property is set to mismSingle, the current selection is cleared prior to selecting the map item.

  • Otherwise, the selection is updated based on the AShiftState parameter value (see above).

Handle the map control’s OnSelectionChanged and OnSelectionChanging events to respond to selection changes and prohibit certain map items from being selected/deselected.

See Also