init-manual-scrollbars in canvas%
Enables and initializes manual scrollbars for the canvas. A
horizontal or vertical scrollbar can be activated only in a canvas
that was created with the 'hscroll or
'vscroll style flag, respectively.
With manual scrollbars, the programmer is responsible for managing all details of the scrollbars, and the scrollbar state has no effect on the canvas's virtual size. Instead, the canvas's virtual size is the same as its client size.
See also
init-auto-scrollbars for information about automatic scrollbars. The horizontal and vertical
scrollbars are always either both manual or both automatic, but they
are independently enabled. Automatic scrollbars can be re-initialized
as manual, and vice-versa.
( -> void
send a-canvas init-manual-scrollbars h-length v-length h-page v-page h-value v-value)
h-length : exact integer in [0, 10000] or #f
v-length : exact integer in [0, 10000] or #f
h-page : exact integer in [1, 10000]
v-page : exact integer in [1, 10000]
h-value : exact integer in [0, 10000]
v-value : exact integer in [0, 10000]
The h-length and v-length arguments specify the length of
each scrollbar in scroll steps (i.e., the maximum value of each
scrollbar). If either is #f, the scrollbar is disabled in the
corresponding direction.
The h-page and v-page arguments set the number of
scrollbar steps in a page, i.e., the amount moved when pressing above
or below the value indicator in the scrollbar control.
The h-value and v-value arguments specify the initial
values of the scrollbars.
If h-value is greater than h-length or v-value is
greater than v-length, an exn:application:mismatch exception is raised. (The page step may be
larger than the total size of a scrollbar.)
See also
on-scroll and
get-virtual-size.