Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scrollbar1 The Scrollbar A final tool in the toolbox is the scrollbar. There are two of them, one ordered horizontally and the other vertically, both do.

Similar presentations


Presentation on theme: "Scrollbar1 The Scrollbar A final tool in the toolbox is the scrollbar. There are two of them, one ordered horizontally and the other vertically, both do."— Presentation transcript:

1 scrollbar1 The Scrollbar A final tool in the toolbox is the scrollbar. There are two of them, one ordered horizontally and the other vertically, both do exactly the same thing. The scrollbar permits smoothly varying data (analog data) to be dealt with in a stepwise (digital data) environment.

2 scrollbar2 Properties of Scrollbars The four most important properties are “min”, “max”, “large change” and “small change”. Their default values are 0, 32767, 1 and 1 respectively.

3 scrollbar3 Property Ranges Min is the smallest value of the range of data, it is at the top or the left of the scrollbar. Max is the largest value of the range of data. It is at the bottom or right.

4 scrollbar4 Click Changes Small Change is the value of the change induced by clicking on either of the end arrows. Large Change is the value of the change induced by clicking in the open areas.

5 scrollbar5 The Thumb The Thumb is a smooth control that can be dragged to any location from Min to Max.

6 scrollbar6 Scrollbar Use (1) Scrollbars can be used whenever there is “analog” (smoothly varying) data to be input, rather than “digital” or numerical data

7 scrollbar7 Scrollbar Use (2) However, there is always the digital information (a number) hidden behind the smoothly scrolling “thumb” of the scrollbar.

8 scrollbar8 Scrollbar Example (1) Option Explicit Dim i As Integer Private Sub Form_Load() For i = 0 To 2 hsbRate(i).Min = 0 hsbRate(i).Max = 100 hsbRate(i).LargeChange = 10 labVal(i).Visible = False Next i End Sub

9 scrollbar9 Scrollbar Example (2) Private Sub hsbRate_Change(Index As Integer) labVal(Index) = hsbRate(Index).Value End Sub Private Sub cmdShowVal_Click() For i = 0 To 2 labVal(i).Visible = _ Not labVal(i).Visible Next i End Sub


Download ppt "Scrollbar1 The Scrollbar A final tool in the toolbox is the scrollbar. There are two of them, one ordered horizontally and the other vertically, both do."

Similar presentations


Ads by Google