On Mon, Aug 8, 2011 at 07:47, alexandr <[email protected]> wrote:

> Hi Qooxdoo Team!
>
> I want to restrict input of some characters in text field using keyinput
> event. How can I do it?
>

The easiest way is to not deal with the keyinput event yourself at all, but
instead use the built-in "filter" property (defined in the superclass of
TextField, qx.ui.form.AbstractField):

    /**
     * RegExp responsible for filtering the value of the textfield. the
RegExp
     * gives the range of valid values.
     * The following example only allows digits in the textfield.
     * <pre class='javascript'>field.setFilter(/[0-9]/);</pre>
     */
    filter :
    {
      check : "RegExp",
      nullable : true,
      init : null
    }

Derrell
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to