Hi,
If the focus is on the ultraMonthViewMulti control and if the mouse is scrolled then months of the control scrolled, i want to stop this behaviour. Is there any property to do that?
Regards,
Abid
Thanks for the feedback.
Thanks Georgi, that's exactly what I was looking for!
Cheers,
Amy
There are many different approaches to solve this task. One possible solution could be:
public partial class Form1 : Form
{
public Form1()
InitializeComponent();
ultraMonthViewMulti1.MouseWheel += new MouseEventHandler(ultraMonthViewMulti1_MouseWheel);
}
private bool IsMouseWheel;
void ultraMonthViewMulti1_MouseWheel(object sender, MouseEventArgs e)
IsMouseWheel = true;
private void ultraMonthViewMulti1_BeforeMonthScroll(object sender, Infragistics.Win.UltraWinSchedule.BeforeMonthScrollEventArgs e)
if (IsMouseWheel)
e.Cancel = true;
IsMouseWheel = false;
Please take a look on attached sample for more details and if you have any questions, feel free to write me
So...I've gotten this far...can you tell me how to cancel the scroll? I did sort of hack code by taking the focus off the control, but it still scrolls a minimum of 1 month before losing focus! Can you tell me how to cancel the scroll from this point...before it scrolls?
private void myUltraMonthViewMulti_MouseWheel(object sender, MouseEventArgs e)
//THIS IS WHERE I NEED TO KNOW HOW TO CANCEL THE SCROLLING...AS THE LOSING FOCUS SCROLLS BEFORE IT LOSES FOCUS!
this.ultraDayView1.Focus();
Ok, was much more simple then I first thought. Here's how you do it:
to assign the MouseWheel to the UltraMonthViewMulti:
this.myUltraMonthViewMulti.MouseWheel += new MouseEventHandler(myUltraMonthViewMulti_MouseWheel);
then add
//whatever you want here...I changed the focus to another control: