The events "keyinput" or "keypress" are better than "keydown" I think ;) But I don't know if there's a way to manipulate the pressed key.
Tobias -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Tobias Koller (GERMO GmbH) Gesendet: Montag, 11. Juni 2007 16:50 An: qooxdoo Development Betreff: Re: [qooxdoo-devel] 0.6.6: maximum number of characters in TextArea Maybe you can catch the "keydown"-event and manipulate the value to null before it is set to the textarea? Is this possible? Tobias -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Daniel Haferkorn Gesendet: Montag, 11. Juni 2007 15:22 An: qooxdoo-devel@lists.sourceforge.net Betreff: Re: [qooxdoo-devel] 0.6.6: maximum number of characters in TextArea Hello Tobias, Tobias Koller (GERMO GmbH) wrote: > Hello, > > I think the main problem is, that there is no maxlength-attribute for a > textfield in standard HTML. > A quick solution would be something like this: > var tarea = new qx.ui.form.TextArea(); > tarea.set({width: 100, height: 100}); > tarea.addEventListener("input", function(e){ > //check the length of your value > },this); > that is what I intend to do, with the event listener containing something like this (I have not tried this out as of yet!): if (tArea.getComputedValue().length > 25) { tArea.setValue(tArea.getComputedValue().substring(0, tArea.getComputedValue().length - 1)); } But this will most likely result in ugly flickering of the unwanted symbol. Regards, Daniel Haferkorn ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel