Dialog windows
Numeric strings entry dialog
Beginning with version V8, the structure of the settings class, ExtendedInputDialogSettings
, has been changed, and is transferred as a parameter to the Dialog window
- ShowExtendedInputDialog()
.
ExtendedInputDialogSettings.EnableNumericString
is replaced by NumericInputMode
, which is an enum
type that consists of:
Disabled
- default value. Entering numeric values is not available.String
- input integer numbers.Decimal
- input fractional numbers.
For the input type of fractional numbers Decimal
properties have been added:
MaxDecimalValue
- maximum value.MinDecimalValue
- minimum value.DefaultDecimalValue
- default value.
With the new properties, it is possible to set appropriate limits for fractional numbers.
When selecting String
or Decimal
, the user will be prompted to enter integers or fractions. ExtendedInputDialogSettings.TabTitleNumericString
is used as explanatory text for fractional numbers.
Example:
var settings = new ExtendedInputDialogSettings
{
NumericInputMode = NumericInputMode.Decimal,
TabTitleNumericString = "Decimal number",
MaxDecimalValue = 500,
DefaultDecimalValue = 50
}
var dialogResult = viewManager.ShowExtendedInputDialog(
"Window Title",
"A subtitle explaining exactly what the user needs to enter.",
settings)
as NumericStringInputDialogResult;
if (dialogResult == null)
return;
// analyze result