Udostępnij za pośrednictwem


IVsStatusbar.SetLineColChar Method

Displays the line number, column number, and character position in the editor information area of the status bar.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function SetLineColChar ( _
    ByRef pvLine As Object, _
    ByRef pvCol As Object, _
    ByRef pvChar As Object _
) As Integer
int SetLineColChar(
    ref Object pvLine,
    ref Object pvCol,
    ref Object pvChar
)
int SetLineColChar(
    [InAttribute] Object^% pvLine, 
    [InAttribute] Object^% pvCol, 
    [InAttribute] Object^% pvChar
)
abstract SetLineColChar : 
        pvLine:Object byref * 
        pvCol:Object byref * 
        pvChar:Object byref -> int 
function SetLineColChar(
    pvLine : Object, 
    pvCol : Object, 
    pvChar : Object
) : int

Parameters

  • pvChar
    Type: System.Object%
    [in] Character position of the cursor.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsStatusbar::SetLineColChar(
   [in]VARIANT *pvLine,
   [in]VARIANT *pvCol,
   [in]VARIANT *pvChar
);

The line number, column and character position are displayed as "Ln##Col##Ch##" in the editor information area of the status bar.

For all parameters, pass in nulla null reference (Nothing in Visual Basic) to leave their values unchanged. The VARIANT for each parameter must be VT_I2, VT_I4, VT_BSTR, or VT_EMPTY. If it is VT_I2 or VT_I4, the number is formatted into Ln ##, Col ##, Ch ##. If it is VT_BSTR, the text is displayed as is, with no formatting. If it is VT_EMPTY, that field is not displayed.

The difference between column and character positions is evident for characters such as the tab character that can incorporate more than one column.

.NET Framework Security

See Also

Reference

IVsStatusbar Interface

Microsoft.VisualStudio.Shell.Interop Namespace