SetSelection Method
Applies To
fpSpread control
Description
Selects a block of cells in the sheet.
Syntax
void CSpreadSheet::SetSelection(long lCol, long lRow, long lCol2, long lRow2);
fpSpread1.SetSelection(ByVal Col As Long, ByVal Row As Long, ByVal Col2 As Long, ByVal Row2 As Long)
Parameters
The following parameters are available:
Parameter | Description |
---|---|
Col | Left column coordinate of selected block |
Row | Top row coordinate of selected block |
Col2 | Right column coordinate of selected block |
Row2 | Bottom row coordinate of selected block |
Remarks
Blocks are indexed starting from zero in the order in which you select them.
This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.
Set the AllowMultiBlocks property to True to allow the user to select multiple blocks of cells. Use the AddSelection method to add a block to the selection. Use the GetSelection method to return a block in the selection.
If the AllowMultiBlocks property is set to False, the SetSelection method sets the coordinates for cells in the single selected block.
Return Type
None
See Also
AllowMultiBlocks, Sheet properties
AddSelection, ClearSelection, GetSelection methods
DLL Correspondence
SSSetSelectBlock function