ComponentOne List 8.0 for ActiveX
Creating and Resizing Splits through User Interaction

You can always create and resize splits in code. However, you can also let your users create and resize splits interactively by setting the AllowSizing property of a split to True. By default, the AllowSizing property is False, and users are prevented from creating and resizing splits.

A typical list with AllowSizing set to False is shown in the following figure. Notice that there is no split box at the left edge of the horizontal scroll bar.

If you set the split's AllowSizing property to True:

Example Title
Copy Code
TDBList1.Splits(0).AllowSizing = True

A split box will appear at the left edge of the horizontal scroll bar, and the user will be able to create new splits at run time.

When the user points to the split box, the pointer will turn into a double vertical bar with a down arrow, which the user can drag to the right to create a new split, as shown in the next figure.

The new split will inherit its properties from the original split. The SizeMode properties of both splits will be automatically set to 0 - Scalable, regardless of the SizeMode of the original split. The Size properties of both splits will be set to the correct ratio of the splits' sizes. The values of the Size properties may end up being rather large. This is because True DBList needs to choose the least common denominator for the total split size, and the user may drag the pointer to an arbitrary position.

Note that both splits' AllowSizing properties are now True, and the divider between them is a double line, which indicates that the splits' sizes are now adjustable. If the user points to the split box between the two splits, the pointer will turn into a double vertical bar with horizontal arrows. The user can drag this pointer to the left or right to adjust the relative sizes of the splits.

If you set AllowSizing to False for either split, the user will no longer be able to adjust the split sizes. Suppose that you disable sizing for the first split:

Example Title
Copy Code
TDBList1.Splits(0).AllowSizing = False

The split box at the left edge of the horizontal scroll bar in the first split will disappear and the divider between the two splits will turn into a solid line. This means that the user will no longer be able to create a new split from the first split, or adjust the sizes of either split. However, since the split box at the left edge of the second split still exists, the user can now create new splits by pointing to this split box and dragging the pointer to the right.

To summarize:

 

 


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

Product Support Forum  |  Documentation Feedback