Class ScrollBar
A scroll bar control
public class ScrollBar : Control
- Inheritance
-
ScrollBar
- Inherited Members
- Extension Methods
Constructors
ScrollBar(Dialog)
Creates a new instance of the scroll bar class
public ScrollBar(Dialog parent)
Parameters
parent
Dialog
Fields
DownButtonLayer
public const int DownButtonLayer = 2
Field Value
MinimumThumbSize
protected const int MinimumThumbSize = 8
Field Value
ThumbLayer
public const int ThumbLayer = 3
Field Value
TrackLayer
public const int TrackLayer = 0
Field Value
UpButtonLayer
public const int UpButtonLayer = 1
Field Value
downButtonRect
protected Rectangle downButtonRect
Field Value
end
protected int end
Field Value
m_position
protected int m_position
Field Value
pgSize
protected int pgSize
Field Value
showingThumb
protected bool showingThumb
Field Value
start
protected int start
Field Value
thumbRect
protected Rectangle thumbRect
Field Value
trackRect
protected Rectangle trackRect
Field Value
upButtonRect
protected Rectangle upButtonRect
Field Value
Properties
PageSize
Size of a 'page'
public int PageSize { get; set; }
Property Value
TrackPosition
Position of the track
public int TrackPosition { get; set; }
Property Value
Methods
Cap()
Clips position at boundaries
protected void Cap()
HandleMouse(WindowMessage, Point, IntPtr, IntPtr)
Stores data for a dropdown list item
public override bool HandleMouse(WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam)
Parameters
msg
WindowMessagept
PointwParam
IntPtrlParam
IntPtr
Returns
Render(Device, float)
Render the scroll bar control
public override void Render(Device device, float elapsedTime)
Parameters
device
DeviceelapsedTime
float
Scroll(int)
Scrolls by delta items. A positive value scrolls down, while a negative scrolls down
public void Scroll(int delta)
Parameters
delta
int
ScrollTo(int)
Scrolls by to position.
public void ScrollTo(int position)
Parameters
position
int
SetTrackRange(int, int)
Sets the track range
public void SetTrackRange(int startRange, int endRange)
Parameters
ShowItem(int)
Shows an item
public void ShowItem(int index)
Parameters
index
int
UpdateRectangles()
Update all of the rectangles
protected override void UpdateRectangles()
UpdateThumbRectangle()
Compute the dimension of the scroll thumb
protected void UpdateThumbRectangle()