TX Text Control .NET for Windows Forms

ParagraphFormatDialog Method

Method
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Invokes the built-in dialog box for setting the formatting attributes of a paragraph.

Syntax

ParagraphFormatDialog()

Opens the dialog box showing the last opened tab.

public System.Windows.Forms.DialogResult ParagraphFormatDialog();

ParagraphFormatDialog(int)

Opens the dialog box showing the specified tab.

public System.Windows.Forms.DialogResult ParagraphFormatDialog(int activeTab);
ParameterDescription
activeTab

Specifies the index of the tab, zero-based, that is displayed when the tabbed dialog box is opened. If this parameter is 0, the dialog box shows the tab for setting alignment, line spacing, indentation and Distances, and if this parameter is 1, the dialog box shows the tab for setting a frame and pagination.

Return Value

If the dialog has been left with the Cancel button the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

Examples

The following example opens the paragraph format dialog for the text control.

var result = textControl.ParagraphFormatDialog(10);
Console.WriteLine($"Paragraph Format Dialog result: {result}");