TextSelection.StartOfLine(vsStartOfLineOptions, Boolean) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Move o objeto para o início da linha atual.
void StartOfLine(EnvDTE::vsStartOfLineOptions Where = EnvDTE.vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn, bool Extend = false);
[System.Runtime.InteropServices.DispId(27)]
public void StartOfLine (EnvDTE.vsStartOfLineOptions Where = EnvDTE.vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn, bool Extend = false);
[<System.Runtime.InteropServices.DispId(27)>]
abstract member StartOfLine : EnvDTE.vsStartOfLineOptions * bool -> unit
Public Sub StartOfLine (Optional Where As vsStartOfLineOptions = EnvDTE.vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn, Optional Extend As Boolean = false)
Parâmetros
- Where
- vsStartOfLineOptions
Opcional. Uma vsStartOfLineOptions constante que representa o local em que a linha é iniciada.
- Extend
- Boolean
Opcional. Determina se o texto movido está recolhido ou não. O padrão é false.
- Atributos
Exemplos
Sub StartOfLineExample()
' Before running this example, open a text document.
Dim objSel As TextSelection = DTE.ActiveDocument.Selection
Dim objActive As VirtualPoint = objSel.ActivePoint
' Collapse the selection to the beginning of the line.
objSel.StartOfLine()
' objActive is "live", tied to the position of the actual selection,
' so it will reflect the new position.
Dim iCol As Long = objActive.DisplayColumn
' Move the selection to the end of the line.
objSel.EndOfLine()
MsgBox("The length of the insertion point line is " & (objActive.DisplayColumn - iCol) & " display characters.")
End Sub
Comentários
Se Extend for True , somente a extremidade ativa da seleção de texto será movida para o início do documento. Caso contrário, a seleção de texto será recolhida e movida.