Adjusts the canvas's vertical and/or horizontal scrollbars. Horizontal/vertical scrollbars can only be used in a canvas that was created with the wx:const-hscroll/wx:const-vscroll style flag.
The canvas interacts with the scollbars in two possible modes: managed and unmanaged. The virtual size and offset of a canvas is automatically set by the scrollbars for a managed canvas; for an unmanaged canvas, the scrollbars are atteched to the canvas, but they do not change the offset, and the canvas's virtual size is the same as its client size. Also, when a managing scrollbar is disabled (in either the hozirontal or vertical direction), the canvas's virtual size is the same as its client size (in the corresponding direction).
The set-scrollbars method creates managing scrollbars if set-virtual-size? is a true value.
The first pair of arguments give the scrolling units as the number of pixels per scroll step, i.e., the amount moved when the up or down scroll arrows are pressed. If either horiz-pixels or vert-pixels is 0 or less, no scrollbars are enabled in the corresponding direction. For unmanaged canvases, the horiz-pixels and vert-pixels control only whether the scrollbars are enabled or not.
The second pair of arguments gives the length of each scrollbar in scroll steps (i.e., the maximum value of each scroollbar). If set-virtual-size? is a true value, this actually sets the virtual size of the canvas along with horiz-pixels and vert-pixels.
The third pair gives 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. This value is generally ignored for managing scrollbars because the page size is calculated automatically.
The x-value and y-value arguments specify the values of the scrollbars.
For example, the following gives a canvas horizontal and vertical managing scrollbars with 20 pixels per scroll step, a size of 50 steps (1000 pixels) in each direction, and 4 steps (80 pixels) to a page: (send a-canvas set-scrollbars 20 20 50 50 4 4)
See also on-scrolland get-virtual-size.