Community
Participate
Working Groups
Build Identifier: 200802251018 I use the content assist(org.eclipse.ui.fieldassist package) in JFace dialog, but in popup proposals dialog, I can not scroll the vertical scroll bar by mouse wheel. I tried different ways to implement the content assist and got the same result (The mouse wheel didn't work). BTW, I added the MouseWheel listener into popup proposal dialog and proposal table, they didn't receive the MouseWheel event either. The following is the snippet. import org.eclipse.jface.dialogs.Dialog; import org.eclipse.ui.fieldassist.*; public MyDialog extends Dialog{ . . . @Override protected Control createDialogArea(Composite parent) { GridLayout layout = new GridLayout(); parent.setLayout(layout); // First way: ContentAssistCommandAdapter Text text1 = new Text(parent, SWT.NONE); ContentAssistCommandAdapter commandAdapter = new ContentAssistCommandAdapter(text1, new TextContentAdapter(), getProposalProvider(), ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND, null, true); commandAdapter2.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); // Second way: ContentProposalAdapter Text text2 = new Text(parent, SWT.NONE); try { char[] autoActivationChars = new char[] { SWT.BS }; ContentProposalAdapter contentProposalAdapter = new ContentProposalAdapter(text2, new TextContentAdapter(), getProposalProvider(), KeyStroke.getInstance("Ctrl+Space"), autoActivationChars); contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); contentProposalAdapter.setPropagateKeys(true); } catch (ParseException e) { e.printStackTrace(); // do nothing } catch (Exception e) { e.printStackTrace(); } // Third way: ContentAssistField ContentAssistField text3= new ContentAssistField(parent, SWT.SINGLE | SWT.BORDER, new TextControlCreator(), new TextContentAdapter(), getProposalProvider(), null, null); ContentAssistCommandAdapter commandAdapter = field.getContentAssistCommandAdapter(); commandAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); commandAdapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE); commandAdapter.setPropagateKeys(true); } private IContentProposal getProposalProvider(){ . . . } } Reproducible: Always Steps to Reproduce: 1.Create JFace Dialog 2.Build a content assist field in dialog. 3.Give content assist field enough proposals to show the vertical scrall bar. 4.Scroll the mouse wheel. 5.Observe the proposal window scroll or not.
> Build Identifier: 200802251018 That build is very old, please try a recent one. If the mouse wheel works when the popup has focus (e.g. after pressing the Tab key), then this is a bug in your OS or mouse driver (bug 75766). *** This bug has been marked as a duplicate of bug 75766 ***
(In reply to comment #1) > > Build Identifier: 200802251018 > That build is very old, please try a recent one. > If the mouse wheel works when the popup has focus (e.g. after pressing the Tab > key), then this is a bug in your OS or mouse driver (bug 75766). > *** This bug has been marked as a duplicate of bug 75766 *** Hi Markus, You are right. I try it in newer build version (Build id:M20090917-0800), this issue can not be reproduced any more. Thanks! Best Regards, Simon Zhou