ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Design.Win Assembly / GrapeCity.ActiveReports.Design Namespace / Designer Class / Selection Property
Example

In This Topic
    Selection Property (Designer)
    In This Topic
    Returns the collection of selected objects.
    Syntax
    'Declaration
     
    Public ReadOnly Property Selection As Selection
    public Selection Selection {get;}

    Property Value

    A Selection object representing the current selection within the designer. This collection includes all report elements or components that the user has selected.
    Remarks
    This property is essential for operations that need to act on the user's selection, such as property editing, deletion, or manipulation of report elements. It provides a way to programmatically access and interact with the selected items in the designer.
    Example
    designer.SelectionChanged += () {
    	removeButton.Enabled = 
    	designer.Selection.OfType<ReportItem>().Count() > 0
    	|| designer.Selection.OfType<ARControl>().Count() > 0;
    }
    See Also