IVsStatusbar.SetSelMode Method
Sets the block or stream selection mode of the editor in the status bar.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Déclaration
Function SetSelMode ( _
ByRef pvSelMode As Object _
) As Integer
'Utilisation
Dim instance As IVsStatusbar
Dim pvSelMode As Object
Dim returnValue As Integer
returnValue = instance.SetSelMode(pvSelMode)
int SetSelMode(
ref Object pvSelMode
)
int SetSelMode(
[InAttribute] Object^% pvSelMode
)
abstract SetSelMode :
pvSelMode:Object byref -> int
function SetSelMode(
pvSelMode : Object
) : int
Parameters
- pvSelMode
Type: System.Object%
[in] Pointer to a VARIANT indicating the selection mode.
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::SetSelMode(
[in]VARIANT *pvSelMode
);
This method controls the way the mouse selects text in the editor window. The default is stream selection, where the user presses the left mouse button to begin the selection and releases the button to end it. Block selection mode allows the user to click the left mouse button in the spot where he or she wants to begin the selection, and then click the left mouse button again to end the selection.
The block or stream selection mode information is displayed in a specific panel of the editor information area of the status bar, which is used only by this method. If the selection mode cannot be changed (for example, if it is always the default stream selection), nothing is displayed in the status bar area for this method.
The VARIANT must be a VT_I4 or VT_BSTR. A VT_BSTR refers to the actual text that is placed in the status bar to indicate the block or stream selection mode of the editor window. A VT_I4 refers to the following enumeration:
enum
{
UIE_TEXTSELMODE_STREAM=0, /* writes "STR" in the status bar */
UIE_TEXTSELMODE_BOX=1/* writes "BLK" in the status bar */
};
When the VARIANT is a VT_I4, the method tests for UIE_TEXTSELMODE_STREAM; anything else is interpreted as UIE_TEXTSELMODE_BOX.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.