Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Shortcut key for combobox?
Shortcut key for combobox? [message #1709744] Wed, 30 September 2015 16:28 Go to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 127
Registered: July 2009
Senior Member

Is there a shortcut key that opens a combobox? This would open the list of items.
Re: Shortcut key for combobox? [message #1712044 is a reply to message #1709744] Wed, 21 October 2015 05:08 Go to previous message
Niraj Modi is currently offline Niraj ModiFriend
Messages: 47
Registered: November 2013
This can be achieved by adding a key listener/adapter to the Combobox, something like below:
Combo combo = new Combo(composite, SWT.None);
combo.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
// Open the Combo when Space-Bar is pressed
if ( e.keyCode == 32 ) {
( (Combo)e.getSource() ).setListVisible( true );
Previous Topic:Progressbar display sync
Next Topic:Browser widget does not display image that uses opacity from css
Goto Forum:

Current Time: Tue Mar 20 08:15:20 GMT 2018

Powered by FUDForum. Page generated in 0.01676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software