Partilhar via


Método IVsExpansionIntellisenseHost.SetText

Substitui o intervalo de texto dentro de uma seleção de expansão com o novo texto.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (em Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Sintaxe

'Declaração
Function SetText ( _
    bstrText As String, _
    fReplaceAll As Integer _
) As Integer
int SetText(
    string bstrText,
    int fReplaceAll
)
int SetText(
    [InAttribute] String^ bstrText, 
    [InAttribute] int fReplaceAll
)
abstract SetText : 
        bstrText:string * 
        fReplaceAll:int -> int
function SetText(
    bstrText : String, 
    fReplaceAll : int
) : int

Parâmetros

  • bstrText
    Tipo: String

    [in] Uma seqüência de caracteres contendo o novo texto.

  • fReplaceAll
    Tipo: Int32

    [in] Se fReplaceAll for true, SetText substitui todo o texto no buffer (incluindo o texto de prefixo). Caso contrário, SetText substitui qualquer coisa dentro da seleção ou inserir o local de seleção se houver uma seleção de comprimento zero.

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna VSConstants.S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

C++

De singlefileeditor.idl:

HRESULT IVsExpansionIntellisenseHost::SetText([in] BSTR bstrText, [in] BOOL fReplaceAll);

Segurança do .NET Framework

Consulte também

Referência

IVsExpansionIntellisenseHost Interface

Namespace Microsoft.VisualStudio.TextManager.Interop