IVsTextView.PositionCaretForEditing(Int32, Int32) Method

Definition

Puts the caret in a position suitable for editing a function.

public:
 int PositionCaretForEditing(int iLine, int cIndentLevels);
public:
 int PositionCaretForEditing(int iLine, int cIndentLevels);
int PositionCaretForEditing(int iLine, int cIndentLevels);
public int PositionCaretForEditing (int iLine, int cIndentLevels);
abstract member PositionCaretForEditing : int * int -> int
Public Function PositionCaretForEditing (iLine As Integer, cIndentLevels As Integer) As Integer

Parameters

iLine
Int32

[in] Integer containing the line to position the caret (cursor) on.

cIndentLevels
Int32

[in] Count of indent levels.

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::PositionCaretForEditing(  
   [in] long iLine,  
   [in] long cIndentLevels  
);  

This method places the caret in a position suitable for editing a function. If there is text on the line, the caret goes to the first non-white space character. Otherwise, this method creates the appropriate number of indentations (cIndentLevels) according to the current language settings and places the caret at this location. No centering is done.

Applies to