SpreadsheetControl.SetSelectedShapes(IList<Shape>) Method
Sets shapes selected in the active worksheet.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v24.1.dll
NuGet Package: DevExpress.Win.Spreadsheet
Declaration
Parameters
Name | Type | Description |
---|---|---|
Shapes | IList<Shape> | A list of the Shape objects. |
Returns
Type | Description |
---|---|
Boolean | true if shapes are selected successfully; otherwise false. If you pass a list that contains at least one shape located in a worksheet that is not active, the method returns false. |
Remarks
All shapes in a worksheet are contained in the ShapeCollection, accessible via the Worksheet.Shapes property. Use the SetSelectedShapes method to select multiple shapes in the active worksheet simultaneously. To get the list of shapes selected in the active worksheet, use the SpreadsheetControl.GetSelectedShapes method. To specify whether multi-selection is available to end-users in the SpreadsheetControl, use the SpreadsheetSelectionOptions.AllowMultiSelection option accessible via the SpreadsheetControl.Options.Behavior.Selection.AllowMultiSelection notation.
To specify a single shape (for example, a picture) selected in the active worksheet, use the SpreadsheetControl.SelectedShape or SpreadsheetControl.SelectedPicture property.
To select shapes in a specific worksheet of the document loaded in the SpreadsheetControl, use the Worksheet.SelectedPicture, Worksheet.SelectedShape, Worksheet.SetSelectedShapes and Worksheet.GetSelectedShapes members of the corresponding worksheet object.