This is a migrated thread and some comments may be shown as answers.

Disable scrolling on mouse over

7 Answers 507 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 18 Oct 2010, 03:44 PM
Hi,
 within your combobox control, there is a functionality to scroll in the combobox item when the mouse is over a combobox even is the combobox doesn't have the focus.

Is there any way to remove this behavior, because if the client scroll down the screen or even hit the mouse wheel by error when the mouse is over a combobox, the data might change without the user seeing it.

I hope you have a way to disable this behavior because I couldn't find any.

7 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 19 Oct 2010, 09:51 AM
Hi Mike,

Thank you for contacting us.

To disable the MouseWheel of the ComboBox you can set the IsMouseWheelEnabled property to "False".

Please let us know if you have any other questions about our controls.

Kind regards,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 19 Oct 2010, 01:40 PM
Hi Konstantina 
    this will disable the entire mousewheel functionnality right? I just need to desactivate it when the mouse is over but the combobox is not focused.


Anyway, I'm gonna try this today, and juggle with the mouseenter, mouseleave event if it doesn't do exactly what I wanted.
I'll get back to you with my result.

Thx
0
Mike
Top achievements
Rank 1
answered on 19 Oct 2010, 01:43 PM
Disregard my last post, I just read the entire tooltip of IsMouseWheelEnabled and this is exactly what i needed!

Thank you for your time.
0
Ranjeet
Top achievements
Rank 1
answered on 07 Feb 2014, 01:05 PM
Hi ,

I am using the below code to disable the mouse scroll on combo box . It is able to disable the mouse scroll but when I am putting the same code on solaris server then the scroll is enable . So please let me know if there is work around for this so that we can disable the mouse scroll on Ccombo .
For your reference I have pasted the code below. I am waiting for the reply.
Thanks in advance !!!!



import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;

public class CComboTest {

    public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setSize(200, 150);
        shell.setLayout(new org.eclipse.swt.layout.GridLayout());

        final CCombo combo = new CCombo(shell, SWT.READ_ONLY);
        combo.add("row1");
        combo.add("row2");
        combo.add("row3");
        combo.addListener(SWT.MouseVerticalWheel, new Listener() {
            

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

        shell.open();

        while (!shell.isDisposed())
        {
            if (!display.readAndDispatch())
                display.sleep();
        }
        display.dispose();        
        
    }
}
0
Yana
Telerik team
answered on 12 Feb 2014, 08:54 AM
Hello Ranjeet,

Please note that this forum thread is for RadComboBox for Silverlight,  the provided code does not seem relevant to it - I am afraid that we cannot be of much help in this case.

Regards,
Yana
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
Shanthosh
Top achievements
Rank 1
answered on 28 Feb 2019, 09:44 AM

hi im using a <telerik:RadComboBox> but here mouse scroll is not supported inside the combobox  

xaml code:

<telerik:RadComboBox ItemsSource="{Binding RoomTypes}"  SelectedValue="{Binding RoomInformation[0].RoomTypeId, Mode=TwoWay}" SelectedValuePath="ParameterId" DisplayMemberPath="ParameterName" Grid.Row="5" Grid.Column="2" HorizontalAlignment="Left" Height="25" Width="200" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel" />

WPF code:

 private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;
            e.Handled = true;
        }

note : also using a event inside a combobox but it cant working

0
Kalin
Telerik team
answered on 04 Mar 2019, 11:42 AM
Hi,

Could you please share some more details - what are you trying to achieve and what is happening? If you can provide sample project that would be really helpful.

I'm looking forward to your reply.

Regards,
Kalin
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ComboBox
Asked by
Mike
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Mike
Top achievements
Rank 1
Ranjeet
Top achievements
Rank 1
Yana
Telerik team
Shanthosh
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or