Sdílet prostřednictvím


IVsTextView.SetSelection(Int32, Int32, Int32, Int32) Method

Definition

Selects specified text.

public:
 int SetSelection(int iAnchorLine, int iAnchorCol, int iEndLine, int iEndCol);
public:
 int SetSelection(int iAnchorLine, int iAnchorCol, int iEndLine, int iEndCol);
int SetSelection(int iAnchorLine, int iAnchorCol, int iEndLine, int iEndCol);
public int SetSelection (int iAnchorLine, int iAnchorCol, int iEndLine, int iEndCol);
abstract member SetSelection : int * int * int * int -> int
Public Function SetSelection (iAnchorLine As Integer, iAnchorCol As Integer, iEndLine As Integer, iEndCol As Integer) As Integer

Parameters

iAnchorLine
Int32

[in] Anchor line position for the selection.

iAnchorCol
Int32

[in] Anchor column position for the selection. Viewcol coordinates may include virtual space.

iEndLine
Int32

[in] End line position for the selection.

iEndCol
Int32

[in] End column position for the selection. Viewcol coordinates may include virtual space.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextView::SetSelection(  
   [in] long iAnchorLine,  
   [in] ViewCol iAnchorCol,  
   [in] long iEndLine,  
   [in] ViewCol iEndCol  
);  

Applies to