ComponentOne List for WinForms
In This Topic
    Creating and Resizing Splits through User Interaction
    In This Topic

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

    A typical list with these properties 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 or at the top of the vertical scroll bar.

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

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.AllowVerticalSplit = True
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.AllowVerticalSplit = true;
    

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

    If you set the split's C1ListBase.AllowHorizontalSplitproperty to True:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.AllowHorizontalSplit = True
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.AllowHorizontalSplit = 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.

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

    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.

    To summarize: