ClipSeparators Property

Returns or sets the characters to be used as column and row separators in Clip strings.

Syntax

[form!]VSFlexGrid.ClipSeparators[ = value As String ]

Remarks

By default, Clip strings are built using tab characters (vbTab or Chr(9)) indicate column breaks, and carriage return characters (vbCr or Chr(13)) indicate row breaks. You may change these characters by assigning a new string to the ClipSeparators property.

The string assigned to the ClipSeparators may be empty, in which case the defaults are used. If it is not empty, it should consist of two distinct characters. The first character will be used as a column separator and the second as a row separator.

The ClipSeparators are used in the following contexts:

1.   With the Clip property.

2.   With the AddItem method.

3.   With the Cell property with the flexcpText setting.

4.   With the SaveGrid and LoadGrid methods with the FlexFileCustomText setting.

For example, the code below saves the contents of the grid to a text file using pipe character ("|") as column separators. Notice how the code saves and restores the ClipSeparators property to avoid any interference with other parts of the application.

    Private Sub Command1_Click()

        Dim cs$

        cs = fg.ClipSeparators

        fg.ClipSeparators = "|" & vbCr

        fg.SaveGrid "c:\pipes.txt", flexFileCustomText

        fg.ClipSeparators = cs

    End Sub

Data Type

String

See Also

VSFlexGrid Control