Back to Devexpress

Worksheet.SetSelectedShapes(IList<Shape>) Method

officefileapi-devexpress-dot-spreadsheet-dot-worksheet-dot-setselectedshapes-x28-system-dot-collections-dot-generic-dot-ilist-devexpress-dot-spreadsheet-dot-shape-x29.md

latest3.6 KB
Original Source

Worksheet.SetSelectedShapes(IList<Shape>) Method

Sets shapes selected in the worksheet.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool SetSelectedShapes(
    IList<Shape> shapes
)
vb
Function SetSelectedShapes(
    shapes As IList(Of Shape)
) As Boolean

Parameters

NameTypeDescription
shapesIList<Shape>

A list of the Shape objects.

|

Returns

TypeDescription
Boolean

true if shapes are selected successfully; otherwise false. If you pass a list that contains at least one shape located in a worksheet other than the current worksheet, 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 worksheet simultaneously. To get the list of selected shapes, use the Worksheet.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 worksheet, use the Worksheet.SelectedShape or Worksheet.SelectedPicture property.

The SelectedPicture , SelectedShape , GetSelectedShapes and SetSelectedShapes members of the SpreadsheetControl or SpreadsheetControl object allow you to select shapes in the worksheet that is currently active in the control.

See Also

GetSelectedShapes()

SelectedShape

SelectedPicture

Worksheet Interface

Worksheet Members

DevExpress.Spreadsheet Namespace