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.
(-> voidsenda-canvasinit-manual-scrollbarsh-lengthv-lengthh-pagev-pageh-valuev-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-lengthandv-lengtharguments 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-pageandv-pagearguments 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-valueandv-valuearguments specify the initial values of the scrollbars.If
h-valueis greater thanh-lengthorv-valueis greater thanv-length, anexn:fail:contractexception is raised. (The page step may be larger than the total size of a scrollbar.)See also
on-scrollandget-virtual-size.