selection property

Set<Part> get selection

This read-only property returns the read-only collection of selected objects. Most commands and many tools operate on this collection.

Do not modify this collection. If you want to select or deselect a particular object in a Diagram, set the Part#isSelected property. If you want to select a collection of Parts, call #selectCollection. If you want to deselect all objects, call #clearSelection. If you want to deselect all objects and select a single object, call #select.

You can limit how many objects the user can select by setting #maxSelectionCount.

There are also DiagramEvents for "ChangingSelection" and "ChangedSelection", which are raised by commands and tools before and after changes to this selection collection.

Note that selection collection and Part#isSelected property are completely independent of the #highlighteds collection and the Part#isHighlighted property.

Implementation

_i3.Set<_i3.Part> get selection => _i4.getProperty(
      this,
      'selection',
    );
set selection (Set<Part> value)

Implementation

set selection(_i3.Set<_i3.Part> value) {
  _i4.setProperty(
    this,
    'selection',
    value,
  );
}