HeaderPane
Main
Hide
Share Link
Print

Slider Keyboard and Mouse Interface

The slider takes the input focus with Tab like the TrackBar and changes the value of the thumb that has the focus. In range mode the lower thumb receives the focus when it arrives with Tab, the upper one with Shift+Tab.

Keyboard

KeyAction
Left, RightMove the thumb by SftSlider.SmallChange in the direction of the arrow on a horizontal slider (see Ticks and Labels for inverted and right-to-left sliders); on a vertical slider Right moves the thumb up and Left down.
Up, DownIncrease and decrease the value by SftSlider.SmallChange; on an inverted vertical slider they move the thumb in the direction of the arrow.
Page Up, Page DownIncrease and decrease the value by SftSlider.LargeChange.
Home, EndMove the thumb to the lowest and highest value it can have: SftSlider.Minimum and SftSlider.Maximum, or the limits the other thumb of a range slider leaves.
Tab, Shift+TabIn range mode, move the focus from the lower to the upper thumb and back before it leaves the slider.

Mouse

ActionResult
Drag a thumbMoves the thumb, at ticks only with SftSlider.SnapToTicks, and gives it the focus. When both thumbs of a range slider are under the mouse, the first move picks the thumb: toward lower values the lower one, otherwise the upper one.
Drag the band between two thumbsMoves both thumbs of a range slider, with their distance unchanged.
Click the trackMoves the nearer thumb by SftSlider.LargeChange toward the mouse and gives it the focus; while the button is held, it keeps moving until it reaches the mouse. In range mode, a press on the track between the thumbs drags the band.
Mouse wheelChanges the value of the thumb that has the focus by SftSlider.SmallChange per notch; rolling the wheel away from the user increases the value. Smaller turns, from a touchpad or a free-spinning wheel, add up to notches. The slider handles the wheel itself, so a scrollable parent does not scroll.

Every change by the user raises SftSlider.Scroll, then SftSlider.ValueChanged; in range mode SftSlider.RangeChanged, followed by SftSlider.ValueChanged when the lower value changed.