Spread 8.0 Documentation
GetSelection Method
Support Options
ActiveX Reference > ActiveX Methods > GetSelection Method

Glossary Item Box

GetSelection Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns one of the selected blocks in the sheet.

Syntax

C++

void CSpreadSheet::GetSelection(long lIndex, VARIANT* plCol, VARIANT* plRow, VARIANT* plCol2, VARIANT* plRow2);

Visual Basic

fpSpread1.GetSelection(ByVal lIndex As Long, plCol As Variant, plRow As Variant, plCol2 As Variant, plRow2 As Variant)

Parameters

The following parameters are available:

Parameter Description
lIndex Block index number
plCol Pointer to a variable that receives the left column coordinate of selected block
plRow Pointer to a variable that receives the top row coordinate of selected block
plCol2 Pointer to a variable that receives the right column coordinate of selected block
plRow2 Pointer to a variable that receives the bottom row coordinate of selected block

Remarks

Blocks are indexed starting from zero, in order from largest to smallest block. You can return the number of selected blocks in the sheet by using the SelectionCount property.

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, use the GetSelection method to return the coordinates for cells in the single selected block.

Return Type

None

See Also

AllowMultiBlocks, SelectionCount, Sheet properties

AddSelection, ClearSelection, SetSelection methods

DLL Correspondence

SSGetMultiSelBlocks function

Copyright © GrapeCity, inc. All rights reserved.