> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetSelectedCells Method of the ImageViewer Object

> SetSelectedCells method of the ImageViewer Object in ABBYY FineReader Engine Visual Components on Windows — This method allows you to set selected cells of a table block.

This method allows you to set selected cells of a table block.

## Syntax

### C++

```cpp theme={null}
HRESULT SetSelectedCells(
  int           blockIndex,
  IFRRectangle* selectedCells
);
```

### C\#

```csharp theme={null}
void SetSelectedCells(
  int         blockIndex,
  IFRRectangle selectedCells
);
```

### Visual Basic .NET

```vb theme={null}
Sub SetSelectedCells( _
  blockIndex As Integer, _
  selectedCells As IFRRectangle _
)
```

## Parameters

blockIndex

\[in] Specifies the index of a table block. The index is in the [ILayout::VisualBlocks](/fine-reader/engine/api-reference/layout-related-objects/layout#visualblocks) collection.

selectedCells

\[in] Refers to the [FRRectangle](/fine-reader/engine/api-reference/supplementary-objects-and-methods/frrectangle) object which specifies the coordinates of the surrounding rectangle of the cells to be selected. Coordinates are defined in a base grid.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## Remarks

By the base grid here we assume the grid formed by table borders and separators. Each vertical separator increments the horizontal coordinate by one, and each horizontal separator increments the vertical coordinate by one. Coordinate axes are oriented from left to right and from top to bottom.

## See also

[ImageViewer](/fine-reader/engine/visual-components-reference/imageviewer)

[GetSelectedCells](/fine-reader/engine/visual-components-reference/imageviewer/getselectedcells-method)
