HypernovaDesktop Components · docs
Binarymission
WinFormsScroll Bars › HorizontalScrollBar

HorizontalScrollBar

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.ScrollBars

Class HorizontalScrollBar. Implements the horizontal mode scroll bar.

public class HorizontalScrollBar : ScrollBarBase

Inherits from / implements: ScrollBarBase

Members at a glance

HorizontalScrollBarInitializes a new instance of the HorizontalScrollBar class.
HorizontalScrollBarInitializes a new instance of the HorizontalScrollBar class.
DefaultSizeGets the size this control starts out at before anything sets it.
IsDefaultScrollContextMenuEnabledGets or sets a value indicating whether this instance has the built-in / default scroll context menu enabled.
ShouldUseExtendedMenuControlForContextMenuGets or sets a value indicating whether the control should use the extended Binarymission menu control for displaying the context menu.
VerticalScrollBarWidthThis property is not relevant for the horizontal mode. Please refer to the base class documentation.
GetNavigatorControlRectReturns the bounds of one of the two arrow buttons.
GetThumbArtefactRectangleReturns where the thumb sits along the horizontal track, sized from the ratio of the visible range to the whole range.
HitTestPerforms hit test and returns the target artefact.
OnMouseDownRaises the MouseDown event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseEnterRaises the MouseEnter event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseLeaveRaises the MouseLeave event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseMoveRaises the MouseMove event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseUpRaises the MouseUp event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnResizeRaises the Resize event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.
PaintScrollBarDraws the horizontal scroll bar: the track, then the thumb, then the arrow buttons.
PerformSizeRefreshRecalculates the horizontal layout - the arrow buttons, the track and the thumb - after the control or its range changes.
HorizontalScrollPositionChangedOccurs when scroll position changed.
LineLeftOccurs when a line is moved to its left (left arrow key).
LineRightOccurs when a line is moved to its right (right arrow key).
PageLeftOccurs when a large change occurs (to its left).
PageRightOccurs when a large change occurs (to its right).
ScrollOccurs when a scroll occurs.
ThumbLeftOccurs when the thumb is moved to its left.
ThumbRightOccurs when the thumb is moved to its right.

Constructors

HorizontalScrollBar

public HorizontalScrollBar()

Initializes a new instance of the HorizontalScrollBar class.

HorizontalScrollBar

public HorizontalScrollBar(IScrollersDockHost parent) : base(parent)

Initializes a new instance of the HorizontalScrollBar class.

parent
The parent.

Properties

DefaultSize

protected override Size DefaultSize

Gets the size this control starts out at before anything sets it.

IsDefaultScrollContextMenuEnabled

public bool IsDefaultScrollContextMenuEnabled

Gets or sets a value indicating whether this instance has the built-in / default scroll context menu enabled.

ShouldUseExtendedMenuControlForContextMenu

public bool ShouldUseExtendedMenuControlForContextMenu

Gets or sets a value indicating whether the control should use the extended Binarymission menu control for displaying the context menu.

Of course, this property is effective only when the vertical and horizontal scroll bar controls have their IsDefaultScrollContextMenuEnabled property set to true.

VerticalScrollBarWidth

public override int VerticalScrollBarWidth

This property is not relevant for the horizontal mode. Please refer to the base class documentation.

Methods

GetNavigatorControlRect

protected internal Rectangle GetNavigatorControlRect(bool isNavigatingLeft)

Returns the bounds of one of the two arrow buttons.

isNavigatingLeft
true for the left button, false for the right one.

Returns. The bounds of that button.

GetThumbArtefactRectangle

protected override Rectangle GetThumbArtefactRectangle()

Returns where the thumb sits along the horizontal track, sized from the ratio of the visible range to the whole range.

Returns. The bounds of the thumb.

HitTest

public ScrollBarInteractionTarget HitTest(Point point)

Performs hit test and returns the target artefact.

OnMouseDown

protected override void OnMouseDown(MouseEventArgs e)

Raises the MouseDown event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseEnter

protected override void OnMouseEnter(EventArgs e)

Raises the MouseEnter event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseLeave

protected override void OnMouseLeave(EventArgs e)

Raises the MouseLeave event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseMove

protected override void OnMouseMove(MouseEventArgs e)

Raises the MouseMove event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseUp

protected override void OnMouseUp(MouseEventArgs e)

Raises the MouseUp event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnResize

protected override void OnResize(EventArgs e)

Raises the Resize event. HorizontalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

PaintScrollBar

protected override void PaintScrollBar(Graphics g)

Draws the horizontal scroll bar: the track, then the thumb, then the arrow buttons.

g
The surface to draw on.

PerformSizeRefresh

protected override void PerformSizeRefresh()

Recalculates the horizontal layout - the arrow buttons, the track and the thumb - after the control or its range changes.

Events

HorizontalScrollPositionChanged

public event EventHandler<PositionChangedArgs> HorizontalScrollPositionChanged

Occurs when scroll position changed.

LineLeft

public event EventHandler LineLeft

Occurs when a line is moved to its left (left arrow key).

LineRight

public event EventHandler LineRight

Occurs when a line is moved to its right (right arrow key).

PageLeft

public event EventHandler PageLeft

Occurs when a large change occurs (to its left).

PageRight

public event EventHandler PageRight

Occurs when a large change occurs (to its right).

Scroll

public event ScrollEventHandler Scroll

Occurs when a scroll occurs.

ThumbLeft

public event EventHandler<ThumbEventArgs> ThumbLeft

Occurs when the thumb is moved to its left.

ThumbRight

public event EventHandler<ThumbEventArgs> ThumbRight

Occurs when the thumb is moved to its right.