ConditionalInstructionDialog Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Opens a dialog box to create or edit a Conditional Instruction.
Syntax
ConditionalInstructionDialog()
Opens a dialog box to create a new Conditional Instruction.
public System.Windows.Forms.DialogResult ConditionalInstructionDialog();Public Function ConditionalInstructionDialog() As System.Windows.Forms.DialogResultConditionalInstructionDialog(string)
Opens a dialog box to edit a specific Conditional Instruction. If the document does not contain a Conditional Instruction with the specified name, the dialog is opened to create such a Conditional Instruction.
public System.Windows.Forms.DialogResult ConditionalInstructionDialog(string name);Public Function ConditionalInstructionDialog(name As String) As System.Windows.Forms.DialogResult| Parameter | Description |
|---|---|
| name | Specifies the name of the |
Return Value
The return value can be one of the following values:
| Result | Meaning |
|---|---|
| DialogResult.OK | The dialog has been left with the OK button and the corresponding Conditional Instruction was created or edited. |
| DialogResult.Cancel | The dialog has been left with the Cancel button. |
| DialogResult.Abort | The dialog has not been opened. |
Examples
The following example opens the conditional instruction dialog for the text control.
var result = textControl.ConditionalInstructionDialog("CustomerName");
Console.WriteLine($"Conditional Instruction Dialog result: {result}");Dim result = textControl.ConditionalInstructionDialog("CustomerName")
Console.WriteLine($"Conditional Instruction Dialog result: {result}")Limitations
The dialog cannot be opened, if the document does not contain form fields, the TextControl.IsFormFieldValidationEnabled is set to false or the EditMode property is set to EditMode.ReadAndSelect. In these cases the method returns DialogResult.Abort.