hello.
i'm trying to make a TextBox that will change value when someone
scrolls the mouse wheel over it. specifically, my goal is for the
number in the text box to increase when i scroll up, and decrease when
i scroll down. however, i'm having trouble figuring out the
MouseWheelHandler. i simplified my code to just change the value to
"UP" or "DOWN", but it just doesn't work. it compiles though. i also
tried it with event.preventDefault(), but that didn't seem to have any
effect.
private TextBox valueField = new TextBox();
...
...
valueField.addMouseWheelHandler(new MouseWheelHandler() {
public void onMouseWheel(MouseWheelEvent event) {
//event.preventDefault();
if(event.isNorth()) {
valueField.setText("UP");
} else {
valueField.setText("DOWN");
}
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---