SuggestBox is an opaque grouping of several underlying widgets which *nearly* does exactly what I want. What it doesn't do is update the textbox with suggested text as you arrow up or down through the list, or as you hover over suggestions with the mouse. For an example of why this is useful, see for instance the Google home page. There is an internal MenuBar event that handles highlighting the appropriate item, but I can't hear it from my package.
Now I can add a KeyDownHandler and catch the arrow key events, and that works just fine, but then I can't see the current selected item because the underlying MenuBar is hidden. So instead I thought of a really hacky way to do it, by sending a KEY_TAB event in, letting the box think it's being selected and fire the selection event normally, but then handling the event differently on the back end. Unfortunately, although I do see things in the right order, when I change the keystroke like this: Document doc = com.google.gwt.dom.client.Document.get(); NativeEvent nativeEvent = doc.createKeyDownEvent(false, false, false, false, KeyCodes.KEY_TAB,KeyCodes.KEY_TAB); event.setNativeEvent(nativeEvent); the SuggestBox still sees a KEY_DOWN. Also, when I just create a new event and fire it to either the SuggestBox or its TextBox, it doesn't seem to respond, and my SelectionHandler isn't called, even though my KeyDownHandler does see it. So (1) anyone have a better approach, or failing that (2) anyone know how to get this one to work? Cheers, Geoff -- 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.
