Question

I have a combo widget(org.eclipse.swt.widgets.Combo). When I scroll a mouse wheel a value of a combo box changes. How do I suppress this behavior?

Thanks.

Was it helpful?

Solution

Try this:

Combo myCombo = new Combo(parent, style);
myCombo.addListener(SWT.MouseVerticalWheel, new Listener()
{

  @Override
        public void handleEvent(Event arg0)
        {
            arg0.doit = false;

        }
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top