%vx - Vertical Scrollbar

Purpose

To attach a vertical scroll bar to the next control.

Syntax

winio@('%vx', page_stepmax_valcur_val)
integer page_stepmax_val     (input)
integer cur_val     (input/output)

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 (Horizontal Scroll Bar) and %vx 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 (Horizontal Scroll Bar) and %vx should not be used with controls like %eb (Edit Box) and %cw (ClearWin Window) which have their own scroll bar mechanism.

Example

winio@('%^vx', 5L, 20L, pos, cb_func)

See also

%hx (Horizontal Scroll Bar)

 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited