IVsTextView.CenterLines 方法

在视图中居中放置文本指定的行。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
Function CenterLines ( _
    iTopLine As Integer, _
    iCount As Integer _
) As Integer
int CenterLines(
    int iTopLine,
    int iCount
)
int CenterLines(
    [InAttribute] int iTopLine, 
    [InAttribute] int iCount
)
abstract CenterLines : 
        iTopLine:int * 
        iCount:int -> int
function CenterLines(
    iTopLine : int, 
    iCount : int
) : int

参数

  • iTopLine
    类型:Int32

    [in] 中的第一行在视图的中心。

  • iCount
    类型:Int32

    [in] 将行的总数在视图的中心。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 textmgr.idl:

HRESULT IVsTextView::CenterLines(
   [in] long iTopLine, 
   [in] long iCount
);

.NET Framework 安全性

请参阅

参考

IVsTextView 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间