Hi Alexander,

seems like you're looking for the preventDefault() method.
Call it on the event object in the listener to have it prevent the 
execution of the default code.

Imagine you don't want the letter "w","W" in your textfield "tf":

tf.addListener("keypress", function(evt) {
   if (evt.getKeyIdentifier() == "W") // Upper case!
   {
     evt.preventDefault();
   }, this);

Otherwise, if you don't want the user to select certain ListItems, you 
can check for the selection in the "changeSelection" listener and have 
the SelectBox or List instantly resetSelection().

HTH,

greetings,
Stefan

On 24.05.2010 22:24, alexander.volik wrote:
>
> Can I "stop" the event in the event listener? For example, I want to forbid a
> user to select certain item in the selectBox or to type certain symbol in
> the textBox. Is this possible?

------------------------------------------------------------------------------

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

Reply via email to