Composite - capture arrow keys

2010-05-15 Thread HBA
Hi, I have written a small widget by extending the Composite (containing a flowPanel, image lable). I'm using the onBrowserEvent method to handle mouse clicks. That works well. However, now I'm trying to capture arrow key events. I'm not able to capture any keyboard events at all. I have

Re: Composite - capture arrow keys

2010-05-15 Thread rjcarr
Instead of adding your event handlers to your composite you should instead add them to the main component in your widget. Since you need to capture mouse and key events you'll want to use a FocusPanel (instead of a FlowPanel). You'll want to add a ClickHandler and one of the Key Handlers to the

Re: Composite - capture arrow keys

2010-05-15 Thread HBA
Thank you! That worked perfectly. On May 15, 3:05 am, rjcarr rjc...@gmail.com wrote: Instead of adding your event handlers to your composite you should instead add them to the main component in your widget.  Since you need to capture mouse and key events you'll want to use a FocusPanel