# 学会 UGUI 之 Scrollbar

The Scrollbar control allows the user to scroll an image or other view that is too large to see completely. Note that the similar Slider control is used for selecting numeric values rather than scrolling. Familiar examples include the vertical Scrollbar at the side of a text editor and the vertical and horizontal pair of bars for viewing a section of a large image or map.

滚动条控件允许用户滚动图像或其他太大的,可以完全看到的视图。请注意类似的滑块控件用于选择数字值,而不是滚动。熟悉的例子包括在一个文本编辑器的一侧和垂直和水平两竖线用于查看较大的图像或地图的一个部分的垂直滚动条。

属性:

Fill Rect → The graphic used for the background area of the control.
用于控件的背景区域的图形。

Handle Rect → The graphic used for the sliding “handle” part of the control
用于控制滚动“handle”部分的图形

Direction → The direction in which the Scrollbar’s value will increase when the handle is dragged. The options are Left To Right, Right To Left, Bottom To Top and Top To Bottom.
当拖动句柄时,滚动条的值会增加的方向。选项是左到右,右到左,底部到顶部和顶部到底部。

Value → Initial position value of the Scrollbar, in the range 0.0 to 1.0.
范围 0.0到 1.0的滚动条的初始位置值。

Size → Fractional size of the handle within the Scrollbar, in the range 0.0 to 1.0.
很小的大小,滚动条的手柄内的,在范围 0.0到 1.0。

Number Of Steps → The number of distinct scroll positions allowed by the Scrollbar.
独特的滚动位置滚动条所允许的数目。