IncreaseIndent Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Increases the left indent of all paragraphs contained in the current text selection. If no text is selected, this method increases the left indent at the text input position. left indent positions are defined through the paragraphs' tab positions and the indents of the paragraphs in front and behind the paragraph with the text input position.
Syntax
public bool IncreaseIndent();Public Function IncreaseIndent() As BooleanReturn Value
The return value is true, if at least one indent could be changed. It is false, if the maximum value has been reached.
Examples
The following example formats the heading of a short document by using Selection.IncreaseIndent.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
if (selection.IncreaseIndent())
{
Console.WriteLine("Increase Indent completed successfully.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
If selection.IncreaseIndent() Then
Console.WriteLine("Increase Indent completed successfully.")
End If