提交 c45a1f1b 编写于 作者: S Serge Rider

#781 Object list searcher - handle CR, UP and DOWN keys.


Former-commit-id: f326b3f3
上级 6f9b51c9
...@@ -329,12 +329,20 @@ public class ProgressPageControl extends Composite implements ISearchContextProv ...@@ -329,12 +329,20 @@ public class ProgressPageControl extends Composite implements ISearchContextProv
searchText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); searchText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
searchText.addKeyListener(new KeyAdapter() { searchText.addKeyListener(new KeyAdapter() {
@Override @Override
public void keyReleased(KeyEvent e) public void keyPressed(KeyEvent e) {
{ switch (e.keyCode) {
if (e.character == SWT.ESC) { case SWT.ESC:
cancelSearch(true); cancelSearch(true);
} else if (e.character == SWT.CR) { break;
performSearch(SearchType.NEXT); case SWT.CR:
case SWT.ARROW_UP:
case SWT.ARROW_DOWN:
if (childPageControl != null) {
childPageControl.setFocus();
}
e.doit = false;
//performSearch(SearchType.NEXT);
break;
} }
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册