Purpose |
To attach a horizontal scroll bar to the next control. |
Syntax |
winio@('%hx', page_step, max_val, cur_val) |
Modifiers |
Caret (^) - the call-back is called when the user clicks on the scroll bar. |
Description |
cur_val is the value that corresponds to the position of the scroll box (also called the thumb). It returns a value between zero and max_val - 1. page_step is the amount that cur_val is to be increased/decreased when the user clicks on the scroll bar (other than on the thumb). For a document, page_step will be set to the number of lines that are to be displayed in the window and max_val should be set to n - page_step, where n is the total number of lines in the document. With %hx and %vx (Vertical Scrollbar) the three arguments cur_val, page_step and max_val can be passed as variables and changed dynamically with a call to WINDOW_UPDATE@. A call to CLEARWIN_INFO@('INTERMEDIATE_SCROLL') will determine if the callback was called whilst the thumb was moving. A return value of 1 indicates movement whilst zero indicates that the thumb is stationary. Both of these events occur at the end of a move. %hx and %vx (Vertical Scrollbar) should not be used with controls like %eb (Edit Box) and %cw (ClearWin Window) which have their own scroll bar mechanism. |
Example |
winio@('%^hx', 5L, 20L, pos, cb_func) |
See also |