Table of Contents
jNumpad
The jNumpad control is a composite control of jButtons and jLabels that can be used to accept numeric input from the operator. Like most controls in the jControls library, it has a rich appearance, employing jControls' fill, border, corner radii, and drop shadow, along with a few additional features.
Button Properties
The jNumpad control has 15 buttons, each of which are exposed as properties.
Because they are exposed as properties, their appearance can be customized in the designer.
TitleLabel Property
The TitleLabel property is a jLabel that serves as the title bar of the jNumpad.
ValueLabel Property
The ValueLabel property is a jLabel that serves to display the value as it is entered by the operator.
ClearOnEdit Property
When set to true the ClearOnEdit property will clear the ValueLabel when the operator first starts entering a value.
MaxLength Property
The MaxLength property sets an upper bound on the number of characters the operator can enter.
InputCommitted Event
The InputCommitted event is fired when the operator presses the Enter button.
InputCancelled Event
The InputCancelled event is fired when the operator presses the Cancel button.
Showing the jNumpad at Runtime
Typically the jNumpad would be added to a jUserConrol that is large enough to cover the screen. To show the jNumpad, the jUserControl would then be added to a jForm at runtime displayed in front of all other controls with the BringToFront method. Because the jUserControl covers the screen and is displayed in front of all other controls, it prevents the operator from touching any other control except the jNumpad. When the operator confirms the input by pressing either the Enter or Cancel buttons, the jUserControl is then removed from the jForm, dismissing the jNumpad. To see a demonstration of this technique, please see the Showcase Visual Studio project template.








