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
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
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
Thank you for your time.
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();
}
}
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).
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
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