Why does the Trackbar value decrease with up arrow / PgUp?

I came across an interesting behavior in the Winforms Trackbar control.

On a horizontal trackbar, the left / right arrow keys work as expected. (The left arrow moves the slider to the left and decreases the value; the right arrow does the opposite) You can also control the slider using the up / down and PageUp / PageDown arrow keys. However, the behavior seems counterintuitive: the up arrow and page move the slider to the left and hence decrease the value. Down arrow and Page down move the slider to the right and increase the value.

When using the vertical track, the up / down keys work as expected, but left arrow = increase and right arrow = decrease.

This is the default behavior in C # Winforms and apparently native Windows. (Not sure if the latter, the slider for UAC works this way)

In WPF, the slider control works "correctly", that is, the value increases with up arrow, right arrow, and PgUp. Also, the Internet Explorer privacy slider works correctly. Not sure why, but I suspect custom key handling.

From an ergonomic point of view, it is clear that up, right, forward and clockwise manipulation of something should increase the value. (This is nothing new; compare Human Factors and Ergonomics Handbook, Second Edition Page 100 )

Now to my question: Does anyone know why this is the case?

+3


source to share


1 answer


I strongly tend to think that this behavior was chosen to maintain control of the trackball in line with the control of the scrollbar.

These two controls have a lot in common (their thumb can move in "row" or "page" increments, both controls can be positioned horizontally or vertically, both use WM_HSCROLL and WM_VSCROLL to notify their parent when the position of the thumb changes ).



From a control point of view, the thumb can move "up" or "down" ("left" or "right", respectively). The navigation keypad for scroll bars used Leftand Upfor upward movement (to the left), as well as Rightand Downfor movement downward (to the right).

The trackball control must have followed the same conventions, so the developers used to implement the scrolling control could apply the same principles to the trackball control.

+1


source







All Articles