How to change the number of lines that the mouse scroll wheel will either rise or fall?
Hello,
Based on the above suggestions you probably could use something like the following:
public Form1(){ InitializeComponent(); ultraGrid1.MouseWheel += new MouseEventHandler(ultraGrid1_MouseWheel);} void ultraGrid1_MouseWheel(object sender, MouseEventArgs e){ if (e.Delta < 0) { // Determine how exactly you would like to scroll the UltraGrid.If you are using the code below you will scroll 10 rows up/down ultraGrid1.DisplayLayout.RowScrollRegions[0].ScrollPosition += 7; } else { ultraGrid1.DisplayLayout.RowScrollRegions[0].ScrollPosition -= 7; }}
void ultraGrid1_MouseWheel(object sender, MouseEventArgs e){ if (e.Delta < 0) { // Determine how exactly you would like to scroll the UltraGrid.If you are using the code below you will scroll 10 rows up/down ultraGrid1.DisplayLayout.RowScrollRegions[0].ScrollPosition += 7; } else { ultraGrid1.DisplayLayout.RowScrollRegions[0].ScrollPosition -= 7; }}
Please if you have any questions do not hesitate to ask me.Regards
Hi,
This is determined by the mouse driver. The Mouse settings on your machine will usually allow you to specify the number of rows to scroll.
There is no way to change it for individual controls.
You might be able to handle the MouseWheel event and either cancel the event and scroll the grid yourself, or else change the number of rows. But I'm not sure if the number is settable or if the event is cancellable.
Another option would be to derive a control from the grid and override the OnMouseWheel method.
This is a function of the local machine settings. Assuming your mouse driver supports configuration of this functionality, the Mouse Properties applet has a setting for the number of lines by which to scroll when the wheel is rotated one notch.