GetDialogBox Method
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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);Public Function GetDialogBox(kind As TextViewGenerator.DialogBoxKind) As DialogViewGenerator| Parameter | Description |
|---|---|
| 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);Public Function GetDialogBox(kind As TextViewGenerator.DialogBoxKind, selectedTab As Integer) As DialogViewGenerator| Parameter | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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:
|
GetDialogBox(PageNumberField)
Returns a view generator for a dialog box handling the attributes of the specified pagenumber field.
public DialogViewGenerator GetDialogBox(PageNumberField pageNumberField);Public Function GetDialogBox(pageNumberField As PageNumberField) As DialogViewGenerator| Parameter | Description |
|---|---|
| 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);Public Function GetDialogBox(formField As FormField) As DialogViewGenerator| Parameter | Description |
|---|---|
| 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}");Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection
Dim result = textViewGenerator.GetDialogBox(TXTextControl.ServerVisualisation.TextViewGenerator.DialogBoxKind.FontDialog, 10)
Console.WriteLine($"Get Dialog Box result: {result}")