ComponentOne List 8.0 for ActiveX
Vertical Scrolling and Split Groups

By default, the list has only one split, with split index 0, and its ScrollBars property is set to 4 - Automatic. That is, the horizontal or vertical scroll bar will appear as necessary depending upon the column widths and the number of data rows available. The default split's ScrollGroup property is 1. Splits having the same ScrollGroup property setting will scroll vertically together. When a new split is created, it will inherit both the ScrollBars and ScrollGroup properties from the parent split. If all of the splits belonging to the same ScrollGroup have their ScrollBars properties set to 4 - Automatic, then True DBList will display the vertical scroll bar only at the rightmost split of the scroll group. Manipulating this scroll bar will cause all splits in the same scroll group to scroll simultaneously.

For example, if you create two additional splits with the following code:

Example Title
Copy Code
Dim S As TrueDBList80.Split

Set S = TDBList1.Splits.Add(0) ' Create a Split at the left

Set S = TDBList1.Splits.Add(0) ' Create another

The resulting list display will look like this.

All three splits will have the same ScrollBars and ScrollGroup properties of 4 and 1, respectively. However, only one vertical scroll bar will be displayed, within the rightmost split. When the user operates this scroll bar, all three splits will scroll simultaneously.

You can change the ScrollGroup property of splits to create split groups that scroll independently. In the preceding example, setting the ScrollGroup property of the middle split to 2 creates a new scroll group:

Example Title
Copy Code
TDBList1.Splits(1).ScrollGroup = 2 ' Create a new scroll group

After this statement executes, scrolling the middle split will not disturb the others, as shown in the following figure, in which a single row is selected.

Note that the middle split now contains a vertical scroll bar. This scroll bar operates only on the middle split, since it is the only one with its ScrollGroup property equal to 2. The vertical scroll bar in the rightmost split now controls the leftmost and rightmost splits only. It no longer affects the middle split.

You can create as many split groups as necessary by setting the ScrollGroup properties of the splits to different values. You can also explicitly control whether scroll bars will be displayed in a split by setting its ScrollBars property.

A common application of this feature is to create two independent split groups so that users can compare field values from different records by scrolling each split to view a different set of rows.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback