KoolInputKoolInputFullVersion 1.7.0.0 released on 10/22/2012

TextBox - KoolNumericTextBox

General Settings

Empty Message:
Keyboard increment:
Mousewheel increment:
Show SpinButton:
Spin Button Position:

Numeric Settings

DecimalDigits:
DecimalSeparator:
GroupSeparator:
GroupSize:
NegativePattern:
PositivePattern:

Description & Sample code

KoolNumericTextBox provides great user experience

If we want to use buttons to increase/decrease number we can use turn on the spin button by setting $ShowSpinButton to true. Furthermore, we can determine the position of Spin Buttons whether on the right or on the left of textbox by using $SpinButtonPosition:

  • 1. $txtNum->SpinButtonPosition = "Right"; // Show spin button on the right. This is default setting.
  • 2. $txtNum->SpinButtonPosition = "Left"; // Show spin button on the left.

Besides, we can use the keyboard or mouse wheel to increase/decrase value of textbox:

  • 1. $txtNum->IncrementSettings->InterceptArrowKeys = true; // Use up/down arrow keys to increase/decrease.
  • 2. $txtNum1->IncrementSettings->InterceptMouseWheel = true; // Use mouse wheel to increase/decrease.

With KoolNumericTextBox, you can format the display of number as you wish. Below are key settings:

  • 1. $txtNum->NumberFormat->DecimalDigits = 2; //Number of decimal digits
  • 1. $txtNum->NumberFormat->DecimalSeparator = "."; //Charater used to separate decimals
  • 1. $txtNum->NumberFormat->GroupSeparator = " "; //Character used to seperate group in the number
  • 1. $txtNum->NumberFormat->GroupSize = 2; //Number of digits in a group.
  • 1. $txtNum->NumberFormat->NegativePattern = 2; //This pattern will be used if number is negative.
  • 1. $txtNum->NumberFormat->PositivePattern = 2; //This pattern will be used if number is positive.