<> = sfDoubleTextBox = == Overview == '''sfDoulbeTextBox''' is a Dyalog namespace that shows examples on how to use the Syncfusion !DoubleTextBox control. The !DoubleTextBox control restricts text box input to only numeric values with support for data binding, Watermark, Null Value, Blendability, and culture support. It provides many customization options to enhance its appearance and to suit your applications. The core features of the !DoubleTextBox are as follows: * Provides the ability to control the range of input values by using the `MinValue` and `MaxValue` properties. * Provides different foreground brushes for positive, negative, and zero values. * Provides data binding support. * Provides built-in Visual Styles and themes. * Provides Watermark support. * Provides Number Format support. * Provides Blendability support. * Provides Null Value support. * Provides culture support. == Installation and deployment == The following assemblies (version 12.1 or newer) are required in the subdirectory '''/Syncfusion/4.5''' of the Dyalog APL version 14 (or newer) directory: * Syncfusion.Shared.Wpf.dll == Using MinValue and MaxValue for Validation on Lost Focus == Here is the steps to use Validation on Lost Focus with a `MinValue` and `MaxValue`: 1. Set the `MinValue` and `MaxValue` properties. 1. Set the `MinValidation` and `MaxValidation` properties to `OnLostFocus`. 1. Set the event `onValueChanged` to `_DoubleTextBox_ValueChangedEvent`. {{{ rootObject.doubleTextBox1.(MinValue MaxValue)←1 100 rootObject.doubleTextBox1.(MinValidation MaxValidation)←rootObject.doubleTextBox1.(MinValidation.OnLostFocus MaxValidation.OnLostFocus) rootObject.doubleTextBox1.onValueChanged←'_DoubleTextBox_ValueChangedEvent' }}} How it works: Each time there is a new value that is entered in the !DoubleText box, the function `_DoubleTextBox_ValueChangedEvent` is called to verify that it is within the `MinValue` and the `MaxValue`. If not, a tooltip (`Warning_ToolTip_xaml`) will appear to warn the user that the value entered is either too high or too low. When the !DoubleText box is loosing focus, if the value is still too high or too low, it will be truncated to the nearest of the `MinValue` or `MaxValue`. The function `DemoDoubleTextBox1` shows an example that looks like this: {{attachment:DoubleTextBoxDemo1_2.png || width=550}} == How to install sfDoubleTextBox in your workspace == 1. Download [[attachment:sfDoubleTextBox.v1.1.txt]] 1. Do a Select all (Ctrl+A) and a copy (Ctrl+C). 1. In your workspace execute `)ed ⍟ sfDoubleTextBox` 1. Paste (Ctrl+V) the text into the Dyalog editor 1. Press Escape and ')save' your workspace Optionally to de-script the namespace you can do: {{{ #.sfDoubleTextBox←{('n' ⎕NS ⍵)⊢n←⎕NS ''}#.sfDoubleTextBox }}} == Version Information == ||Original author: ||Pierre Gilbert || ||Responsible: ||PierreGilbert || ||Email: || <> || ---- CategoryDyalog - CategoryDyalogDotNet - CategorySyncfusionWpfExamples - CategoryDotNet