共用方式為


IVsTextViewFilter.GetDataTipText Method

Provides data-tip support by obtaining the string value of the tip text.

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

Syntax

'宣告
Function GetDataTipText ( _
    <OutAttribute> pSpan As TextSpan(), _
    <OutAttribute> ByRef pbstrText As String _
) As Integer
int GetDataTipText(
    TextSpan[] pSpan,
    out string pbstrText
)
int GetDataTipText(
    [InAttribute] [OutAttribute] array<TextSpan>^ pSpan, 
    [OutAttribute] String^% pbstrText
)
abstract GetDataTipText : 
        pSpan:TextSpan[] byref * 
        pbstrText:string byref -> int 
function GetDataTipText(
    pSpan : TextSpan[], 
    pbstrText : String
) : int

Parameters

  • pSpan
    Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
    [in, out] On input, the parameter specifies the user-selected characters to which the tip should apply. On output, the parameter specifies a pointer to the entire span of text associated with the tip.
  • pbstrText
    Type: System.String%
    [out] Pointer to a string containing the tip text.

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 textmgr.idl:

HRESULT IVsTextViewFilter::GetDataTipText(
   [in, out] TextSpan * pSpan,
   [out] BSTR * pbstrText
);

Use this method to provide a data tip for a variable or other language construct in the core text editor. For example, Visual Basic uses data tips to show the value of a variable as a user steps through code.

.NET Framework Security

See Also

Reference

IVsTextViewFilter Interface

Microsoft.VisualStudio.TextManager.Interop Namespace