ImageEn, unit imageenview

TImageEnView.SelectionOptions

TImageEnView.SelectionOptions


Declaration

property SelectionOptions: TIESelectionOptions;


Description

Provides access to selection behavior options.

Default: SelectionOptions = [iesoAnimated, iesoSizeable, iesoMoveable, iesoCanScroll, iesoAllowMoveByKeyboard, iesoCircleSizeable];


Example

// Prevent selections from being moved or resized
ImageEnView1.SelectionOptions := ImageEnView1.SelectionOptions - [iesoMoveable, iesoSizeable, iesoCircleSizeable, iesoPolygonSizeable];

// Prevent resetting of selection when clicking on window
ImageEnView1.SelectionOptions := ImageEnView1.SelectionOptions + [iesoDisableOneClickDeselect];

// Auto-close polygon selection with wide click area
IEGlobalSettings().PolygonAutoCloseDistance := 20;
ImageEnView1.SelectionOptions := ImageEnView1.SelectionOptions + [ iesoAutoTerminatePolySelect ];
ImageEnView1.MouseInteractGeneral := [ miSelectPolygon ];

// Allow resizing of polygons (and prevent resizing to smaller than 100x100 to minimize rounding errors)
ImageEnView1.SelectionOptions := ImageEnView1.SelectionOptions + [iesoPolygonSizeable];
ImageEnView1.SelectionAbsWidth := 100;
ImageEnView1.SelectionAbsHeight := 100;
ImageEnView1.SelectionAspectRatio := -2;