ChartDirector 7.1 (.NET Edition)

WinChartViewer.MouseWheelAutoFocus


Declaration

[C#]public bool MouseWheelAutoFocus {get; set;};
[VB]Public Property MouseWheelAutoFocus As Boolean

Description

Determines whether to automatically grab the focus to support mouse wheel zooming.

Most mouse events, such as the mouse move and mouse click, occurs in the control that is under the mouse. However, the mouse wheel event occurs in the focused control, which is not necessarily the control under the mouse. For example, if the scrollbar has focus, moving the mouse wheel will cause the scrollbar to move, even if the mouse wheel is over the chart and not on the scrollbar.

This property causes the WinChartViewer to automatically grab the focus if the mouse wheel zooming is enabled and the mouse moves the WinChartViewer control. In this way, simply moving the mouse over the WinChartViewer will allow the user to zoom using the mouse wheel. When the mouse leave the WinChartViewer, it will restore the focus to the original control.