expand ListBox as droplist using keyboard

188 views
Skip to first unread message

Jonathan Alon

unread,
Mar 21, 2011, 2:31:20 PM3/21/11
to Google Web Toolkit
Hi,

I have a FlexTable full of ListBoxs set to 1 visible item, when
clicked on with the mouse the listbox will expand and let me see the
full list of items, I want to create a keyboard shortcut to mimic the
same effect.
I've tried adding keypresshandler to handle specific key and through
it fire a mouse down NativeEvent, but it does nothing.
Anyone have a clue? ideas?

Thanks in advance.

Alexandre Ardhuin

unread,
Mar 23, 2011, 6:10:27 PM3/23/11
to google-we...@googlegroups.com
ListBox use html SELECT element.
Thus, you have natively (without keypresshandler) keys up/down to change selection and :
 - in Firefox and IE : ALT+DOWN/ALT+UP to expand/collapse select.
 - in chrome : Space/esc to expand/collapse select.

I don't know if you can expand select with javascript.

Alexandre.


2011/3/21 Jonathan Alon <jonn...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Jonathan Alon

unread,
Apr 2, 2011, 10:44:31 PM4/2/11
to Google Web Toolkit
I didn't know about the alt+down/alt+up / space shortcuts

I wish I have seen your reply earlier, I ended up changing the size of
the select element when pressing space, and changing it back to one on
blur

Thanks

On Mar 24, 12:10 am, Alexandre Ardhuin <alexandre.ardh...@gmail.com>
wrote:
> ListBox use html SELECT element.
> Thus, you have natively (without keypresshandler) keys up/down to change
> selection and :
>  - in Firefox and IE : ALT+DOWN/ALT+UP to expand/collapse select.
>  - in chrome : Space/esc to expand/collapse select.
>
> I don't know if you can expand select with javascript.
>
> Alexandre.
>
> 2011/3/21 Jonathan Alon <jonno...@gmail.com>
Reply all
Reply to author
Forward
0 new messages