IVsStatusbar.SetSelMode(Object) Method

Definition

Sets the block or stream selection mode of the editor in the status bar.

public:
 int SetSelMode(System::Object ^ % pvSelMode);
int SetSelMode(winrt::Windows::Foundation::IInspectable const & & pvSelMode);
public int SetSelMode (ref object pvSelMode);
abstract member SetSelMode : obj -> int
Public Function SetSelMode (ByRef pvSelMode As Object) As Integer

Parameters

pvSelMode
Object

[in] Pointer to a VARIANT indicating the selection mode.

Returns

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.

Applies to