Freigeben über


IVsExpansionIntellisenseHost.SetText(String, Int32) Method

Definition

Replaces the text span within an expansion selection with new text.

public:
 int SetText(System::String ^ bstrText, int fReplaceAll);
public:
 int SetText(Platform::String ^ bstrText, int fReplaceAll);
int SetText(std::wstring const & bstrText, int fReplaceAll);
public int SetText (string bstrText, int fReplaceAll);
abstract member SetText : string * int -> int
Public Function SetText (bstrText As String, fReplaceAll As Integer) As Integer

Parameters

bstrText
String

[in] A string containing the new text.

fReplaceAll
Int32

[in] If fReplaceAll is true, SetText(String, Int32) replaces all text in the buffer (including prefix text). Otherwise, SetText(String, Int32) replaces anything within the selection or insert at the selection location if there is a zero-length selection.

Returns

If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.

Remarks

C++

From singlefileeditor.idl:

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

Applies to