| How to Use Splits > Split Matrix Notation |
When the list contains both horizontal and vertical splits, it is said to be organized in a two-dimensional split matrix. Reference and access to the properties of the split objects in the matrix is accomplished with a two-dimensional matrix notation. The index for a particular split in a split matrix is the split row, then the column delimited by a comma. For instance, accessing the second vertical split (column) in the third horizontal split (row) would look like the following:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.Splits.Item(3, 2).Style.ForeColor = System.Drawing.Color.Blue |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.Splits[3, 2].Style.ForeColor = System.Drawing.Color.Blue; |
|
Note: Notice that the Item property is used in the previous example. When accessing a split through split matrix notation, the item property must be explicitly specified. When accessing a split in a list with a one-dimensional structure, the Item property is taken as implicit and can be omitted.
For instance, accessing the second split in a list with only horizontal splits would look like the following:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.Splits(2).Style.ForeColor = System.Drawing.Color.Blue |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.Splits[2].Style.ForeColor = System.Drawing.Color.Blue; |
|