TX Text Control .NET Server

GetDialogBox Method

Method|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Returns a view generator for the specified built-in dialog box.

Syntax

GetDialogBox(TextViewGenerator.DialogBoxKind)

Returns a view generator for the specified built-in dialog box.

public DialogViewGenerator GetDialogBox(TextViewGenerator.DialogBoxKind kind);
ParameterDescription
kind

Specifies which kind of dialog box is represented through the view generator. It can be one of the values specified through the DialogBoxKind enumeration.

GetDialogBox(TextViewGenerator.DialogBoxKind, int)

Returns a view generator for the specified built-in dialog box and selects the specified dialog box tab.

public DialogViewGenerator GetDialogBox(TextViewGenerator.DialogBoxKind kind, int selectedTab);
ParameterDescription
kind

Specifies which kind of dialog box is represented through the view generator. It can be one of the values specified through the DialogBoxKind enumeration.

selectedTab

Specifies an zero-based index indicating which dialog box tab is selected. This parameter can only be used for the following dialog boxes:

Dialog BoxPossible Tabs
ImageAttributesDialogTab 0: Layout and position, tab 1: Size, scaling and distances, tab 2: Saving options.
TextFrameAttributesDialogTab 0: Layout and position, tab 1: Size, scaling and distances, tab 2: frame width and color.
BarcodeLayoutDialogTab 0: Layout and position, tab 1: Size, scaling and distances, tab 2: barcode options like type, text, rotation and colors.
ChartLayoutDialogTab 0: Layout and position, tab 1: Size, scaling and distances.
DrawingLayoutDialogTab 0: Layout and position, tab 1: Size, scaling and distances.
TableFormatDialogTab 0: Frame width and color, background color and text distances, tab 1: Cell height, vertical alignment and formatting options.
ParagraphFormatDialogTab 0: Alignment, text direction, indents and distances, tab 1: Frames and pagination.
SectionFormatDialogTab 0: Page size, orientation and page margins, tab 1: Defining headers and footers, tab 2: Attributes of page columns, tab 3: Attributes of page frames.

GetDialogBox(PageNumberField)

Returns a view generator for a dialog box handling the attributes of the specified pagenumber field.

public DialogViewGenerator GetDialogBox(PageNumberField pageNumberField);
ParameterDescription
pageNumberField

Specifies the PageNumberField for which the dialog box is opened.

GetDialogBox(FormField)

Returns a view generator for a dialog box handling the attributes of the specified form field.

public DialogViewGenerator GetDialogBox(FormField formField);
ParameterDescription
formField

Specifies the FormField for which the dialog box is opened.

Return Value

The method returns a DialogViewGenerator object which can be used to manage and display a built-in dialog box. The return value is null, if a previously returned view generator has not yet been disposed.

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.GetDialogBox.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

var result = textViewGenerator.GetDialogBox(TXTextControl.ServerVisualisation.TextViewGenerator.DialogBoxKind.FontDialog, 10);
Console.WriteLine($"Get Dialog Box result: {result}");