init-auto-scrollbars in canvas%
Enables and initializes automatic 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 automatic scrollbars, the programmer specifies the desired
virtual size of the canvas, and the scrollbars are automatically
handled to allow the user to scroll around the virtual area. The
scrollbars are not automatically hidden if they are unneeded; see
show-scrollbars.
See also
init-manual-scrollbars for information about manual 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-auto-scrollbarshoriz-pixelsvert-pixelsh-valuev-value)
horiz-pixels: exact integer in [1, 10000] or#f
vert-pixels: exact integer in [1, 10000] or#f
h-value: real number in [0.0, 1.0]
v-value: real number in [0.0, 1.0]Initializes the scrollbars and resets the canvas's virtual size to the given values. If either
horiz-pixelsorvert-pixelsis#f, the scrollbar is not enabled in the corresponding direction, and the canvas's virtual size in that direction is the same as its client size.The
h-valueandv-valuearguments specify the initial values of the scrollbars as a fraction of the scrollbar's range. A0.0value initializes the scrollbar to its left/top, while a1.0value initializes the scrollbar to its right/bottom.See also
on-scrollandget-virtual-size.