SCROLLBAR widgets are used for scrolling through list boxes or any other type of window. They may be created horizontally or vertically. A scroll bar is typically attached to an existing window.
SCROLLBAR
|
SCROLLBAR with new skin.
|
Receives focus
|
Yes
|
Skinnable
|
Yes
|
OwnerDraw
|
No
|
Uses Memory Devices
|
No
|
Attached widgets
|
None
|
Notification codes
The following events are sent from a SCROLLBAR widget to its parent window as part of a WM_NOTIFY_PARENT message:
Message |
Description
|
WM_NOTIFICATION_CLICKED
|
SCROLLBAR has been clicked.
|
WM_NOTIFICATION_RELEASED
|
SCROLLBAR has been released.
|
WM_NOTIFICATION_SCROLLBAR_ADDED
|
SCROLLBAR has just been added (attached) to an existing window. The window needs to be informed so that it can initialize the scroll bar.
|
WM_NOTIFICATION_VALUE_CHANGED
|
Value of SCROLLBAR has changed, either by moving the thumb or by pressing the arrow buttons.
|
Keyboard reaction
The SCROLLBAR widget reacts to the following keys if it has the input focus:
Message |
Description
|
GUI_KEY_RIGHT
|
Increments the current value of the SCROLLBAR widget by 1.
|
GUI_KEY_DOWN
|
Increments the current value of the SCROLLBAR widget by 1.
|
GUI_KEY_PGDOWN
|
Increments the current value of the SCROLLBAR widget by a value which represents 1 page.
|
GUI_KEY_LEFT
|
Decrements the current value of the SCROLLBAR widget by 1.
|
GUI_KEY_UP
|
Decrements the current value of the SCROLLBAR widget by 1.
|
GUI_KEY_PGUP
|
Decrements the current value of the SCROLLBAR widget by a value which represents 1 page.
|
Samples
Below are links to samples that demonstrate how to use SCROLLBAR widgets in emWin.