Silverfrost Logo About Us | Contact Us
 

%hx - Horizontal Scroll Bar

Purpose

To attach a horizontal scroll bar to the next control.

Syntax

winio@('%hx', 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 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 and %vx should not be used with controls like %eb and %cw which have their own scroll bar mechanism.

Example

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

See also

%vx - Vertical Scrollbar

 

 

 

Copyright © 1999-2017 Silverfrost Limited