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: 122
Registered: July 2009
Senior Member
Hi,

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
Member
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() {
@Override
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: Fri Dec 15 23:43:48 GMT 2017

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

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