ScrollBarEventArgs Class

.NET Framework (current version)
 

Used as a parameter object in the AxisScrollBarClicked of the root Chart object.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

System.Object
  System.EventArgs
    System.Windows.Forms.DataVisualization.Charting.ScrollBarEventArgs

public class ScrollBarEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodScrollBarEventArgs(Axis, Int32, Int32, ScrollBarButtonType)

Initializes a new instance of the ScrollBarEventArgs class with the specified axis, X and Y positions of the mouse cursor, and type of button clicked.

NameDescription
System_CAPS_pubpropertyAxis

Gets the Axis object that a scrollbar belongs to.

System_CAPS_pubpropertyButtonType

Gets the type of scrollbar button that the end-user clicked.

System_CAPS_pubpropertyChartArea

Gets the ChartArea object that the scrollbar belongs to.

System_CAPS_pubpropertyIsHandled

Gets or sets a flag that indicates whether to cancel the default behavior of specific scrollbar events.

System_CAPS_pubpropertyMousePositionX

Gets the X position of the mouse cursor at the time the AxisScrollBarClicked event was raised.

System_CAPS_pubpropertyMousePositionY

Gets the Y position of the mouse cursor at the time the AxisScrollBarClicked event was raised.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The ScrollBarEventArgs class is exposed as the e parameter in the AxisScrollBarClicked event.

The ScrollBarEventArgs class contains the following properties:

  • The ChartArea property, which is used to get the ChartArea object that the event was raised for. The T:System.Windows.Forms.DataVisualization.Charting.ChartArea.Name property gets the name of the chart area; other chart area properties can also be set.

  • The Axis property, which is used to get the Axis object that the scrollbar belongs to, using the AxisName property. Other Axis properties can also be set.

  • The ButtonType property, which is used to get the scrollbar button that the end-user clicked.

  • The IsHandled property, which determines if the Chart control cancels default behavior of the scrollbar button after the code in the AxisScrollBarClicked event completes execution.

  • The MousePositionX property, which represents the X position of the mouse cursor at the time the end-user clicked the scrollbar element.

  • The MousePositionY property, which represents the Y-position of the mouse cursor at the time the end-user clicked the scrollbar element.

.NET Framework
Available since 4.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: