GrowFont Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Increases the font size of each font contained in the current text selection. If no text is selected, this method increases the font size at the text input position. The font sizes used with this method are the same as shown through the ButtonBar or the built-in font dialog.
Syntax
public bool GrowFont();Public Function GrowFont() As BooleanReturn Value
The return value is true, if at least one font size 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.GrowFont.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
if (selection.GrowFont())
{
Console.WriteLine("Grow Font completed successfully.");
}textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
If selection.GrowFont() Then
Console.WriteLine("Grow Font completed successfully.")
End If