Export (0) Print
Expand All
Cut
Run
Expand Minimize

Unindent Method (EditPoint Object)

Visual Studio .NET 2003

Removes the indent characters from the selected lines by the given number of indentation levels.

[Visual Basic .NET]
Public Sub Unindent( _
   Optional ByVal Point As TextPoint = Nothing, _
   Optional ByVal Count As Integer = 1 _
) 
[Visual Basic 6]
Sub Unindent( _
   Optional ByVal Point As TextPoint = Nothing, _
   Optional ByVal Count As Int = 1 _
) 
[C++]
HRESULT __stdcall Unindent(
   TextPoint* Point,
   int Count
);
[C#]
public void Unindent(
   TextPoint Point,
   int Count
);
[JScript .NET]
public function Unindent(
   Point : TextPoint,
   Count : int
)

Parameters

Point
Optional. The endpoint. Defaults to the endpoint, causing the current line in the buffer to be outdented. The default value is one indentation level.
Count
Optional. The number of display columns to indent each line. The default is 1.

Remarks

Unindent removes Count levels of indentation from each line between the edit point and Point, including the lines that contain these endpoints. The number of columns that display in a level of indentation is determined by a global setting. Tabs and characters are deleted and inserted as necessary to remove one indentation level according to the current global settings for tab size and indent level size.

If Count is negative, then Unindent performs similarly to Indent.

Unindent fails if Count is greater than or equal to 10,000.

Example

Sub UnindentExample()
  ' Before running this example, open a text document.
  Dim objTD As TextDocument
  Dim objEP As EditPoint

  objTD = DTE.ActiveDocument.Object("TextDocument")
  objEP = objTD.StartPoint.CreateEditPoint
  objEP.Indent(,10)
  objEP.Unindent(,5)
End Sub

See Also

Applies To: EditPoint Object

Show:
© 2015 Microsoft