View as standalone SVG

The new pergola.Key class implements input in Pergola. The pergola.Input class (named ValueInputBox in previous versions) has been extended to integrate this capability.

The input box can be configured through the properties hasButtons, realTime for real time processing, width, height, caption, and suffix.

If the callback object or function property is specified, it overrides (any or all) the default pergola.Key class methods. In this example the default keypress method is overridden by the specified pergola.Key.keypressPosInt, designed to filter positive integers. Learn more in the SVG magazine Keyboard Class article.

You can also specify min and max numeric thresholds, maxLength maximum string length number, baseValue string or number, initial value string or number, a target object and propName string property name on which to operate, and the associated fn callback function.

Full overflow management is implemented (with default or custom notifications).