ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Split.SplitSize Property

Gets or sets the size of a split.

[Visual Basic]

Public Property SplitSize As Integer

[C#]

public int SplitSize {get;set;}

[Delphi]

public property SplitSize: Int32 read get_SplitSize write set_SplitSize;

Remarks

The meaning of the value returned by this property is determined by the split's SplitSizeMode property setting.

If SplitSizeMode is set to the default value of SizeModeEnum.Scalable, then the value returned by the SplitSize property is an integer indicating the relative size of the split with respect to other scalable splits.

If SplitSizeMode is set to SizeModeEnum.Exact, then the value returned by the SplitSize property is a floating point number indicating the exact size of the split in terms of the coordinate system of the grid's container.

If SplitSizeMode is set to SizeModeEnum.NumberOfColumns, then the value returned by the SplitSize property is an integer indicating the number of columns displayed in the split.

Note that when there is only one split (the grid's default behavior), the split spans the entire width of the grid, the SplitSizeMode property is always SizeModeEnum.Scalable, and the SplitSize property is always 1. Setting either of these properties has no effect when there is only one split. If there are multiple splits, and all but one is removed, the SplitSizeMode and SplitSize properties of the remaining split automatically revert to SizeModeEnum.Scalable and 1, respectively.

Example

In this example, the SplitSizeMode property has been set to SizeModeEnum.NumberOfColumns, so the value returned by the SplitSize property, 2 in this case, indicates that 2 columns are displayed in the first split:

·      Visual Basic

       Me.C1TrueDBGrid1.Splits(0).SplitSizeMode = SizeModeEnum.NumberOfColumns

       Me.C1TrueDBGrid1.Splits(0).SplitSize = 2

·      C#

       this.c1TrueDBGrid1.Splits[0].SplitSizeMode = SizeModeEnum.NumberOfColumns;

       this.c1TrueDBGrid1.Splits[0].SplitSize = 2;

·      Delphi

       Self.C1TrueDBGrid1.Splits[0].SplitSizeMode := SizeModeEnum.NumberOfColumns;

       Self.C1TrueDBGrid1.Splits[0].SplitSize := 2;

See Also

Split Class | Split Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.