PDA

View Full Version : How to capure update value of TextField ?



ario
4 Sep 2009, 11:44 PM
Hi,
How can capture update value of textfield?
i use :
myTextFiled.addListener(Events.OnKeyDown, new Listener<BaseEvent>() {......}
but it dosen't work.
I want to caputer event changing value (add or remove a charater).

heggarta
7 Sep 2009, 11:18 PM
See http://www.extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/widget/form/Field.html.

It says it fires a FieldEvent KeyPress so you'll need:

myTextField.addListener(Events.KeyPress, new Listener<FieldEvent>() {......}

ario
9 Sep 2009, 3:00 AM
Thank heggarta,

It was great!