scrolling_20a_20list_20box
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
scrolling_20a_20list_20box [2018/03/31 13:19] – external edit 127.0.0.1 | scrolling_20a_20list_20box [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, March 2007//\\ \\ You can scroll the contents of a list box, under the control of your own program, by sending it a **WM_VSCROLL** message. The simple program below illustrates the use of that technique: | //by Richard Russell, March 2007//\\ \\ You can scroll the contents of a list box, under the control of your own program, by sending it a **WM_VSCROLL** message. The simple program below illustrates the use of that technique: | ||
+ | <code bb4w> | ||
INSTALL @lib$+" | INSTALL @lib$+" | ||
Line 18: | Line 19: | ||
SYS " | SYS " | ||
UNTIL FALSE | UNTIL FALSE | ||
+ | </ | ||
Here the **SB_BOTTOM** scroll command is sent, which causes the list box to scroll so the last item is in view. The full set of commands is as follows:\\ \\ | Here the **SB_BOTTOM** scroll command is sent, which causes the list box to scroll so the last item is in view. The full set of commands is as follows:\\ \\ | ||
+ | <code bb4w> | ||
SB_LINEUP = 0 : REM Scrolls one line up | SB_LINEUP = 0 : REM Scrolls one line up | ||
SB_LINEDOWN = 1 : REM scrolls one line down | SB_LINEDOWN = 1 : REM scrolls one line down | ||
Line 25: | Line 28: | ||
SB_TOP = 6 : REM Scrolls to the top | SB_TOP = 6 : REM Scrolls to the top | ||
SB_BOTTOM = 7 : REM scrolls to the bottom | SB_BOTTOM = 7 : REM scrolls to the bottom | ||
+ | </ | ||
The code shown is appropriate for scrolling a list box on your main window. You can similarly scroll a listbox within a dialogue box by using **SendDlgItemMessage** as below:\\ \\ | The code shown is appropriate for scrolling a list box on your main window. You can similarly scroll a listbox within a dialogue box by using **SendDlgItemMessage** as below:\\ \\ | ||
+ | <code bb4w> | ||
SYS " | SYS " | ||
+ | </ |
scrolling_20a_20list_20box.1522502379.txt.gz · Last modified: 2024/01/05 00:16 (external edit)