Back to Devexpress

TdxCustomMapControl.Select(TdxMapItem,TShiftState,Boolean) Method

vcl-dxmapcontrol-dot-tdxcustommapcontrol-dot-select-x28-dxmapitem-dot-tdxmapitem-system-dot-classes-dot-tshiftstate-system-dot-boolean-x29.md

latest2.1 KB
Original Source

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

NameType
AMapItemTdxMapItem
AShiftStateTShiftState
ACheckSelectionModeBoolean

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

TdxCustomMapControl.Deselect

TdxCustomMapControl Class

TdxCustomMapControl Members

dxMapControl Unit