Hello!
Do you by chance know how to achieve a masked textField? What I want to do
is to make a text field which will serve as input for registration key of
known format (like AAAA-BBBB-CCCC-DDDD). I want those "-" to be
automatically added (or to be displayed all the time). 
What I managed to accomplish is adding "-" signs after every 4 characters
like this:

        var i = 1;
        field.addListener("keydown", function(key) {            
                var pos = field.getTextSelectionStart();
                if ( pos == 5 * i - 1) {
                        field.setValue(field.getValue()+"-");
                        i++;
                }
        },this);

But when a user starts to delete characters or inputs something in the
middle - it gets all messed up.
What I am lacking is a masked input widget. Anybody has an idea how to
implement it?
-- 
View this message in context: 
http://old.nabble.com/textField-masked-input-tp28447538p28447538.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to