TextSelection::Mode Property

 

Sets or gets a value determining whether dragging the mouse selects in stream or block mode.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

property vsSelectionMode Mode {
	vsSelectionMode get();
	void set(vsSelectionMode value);
}

Property Value

Type: EnvDTE::vsSelectionMode

A vsSelectionMode constant.

Mode can be set only when the selection is collapsed to a single point. By default, methods that extend the selection do so in stream mode. Any method or action that collapses the selection automatically sets Mode to vsSelectionModeStream.

Sub ModeExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   MsgBox("Selection mode: " & objSel.Mode.ToString)
   objSel.Mode = vsSelectionMode.vsSelectionModeBox
   MsgBox("Selection mode: " & objSel.Mode.ToString)
End Sub
Return to top
Show: