Share via


Clip Property (ModHFGrid)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets the contents of the cells in the ModHFGrid control's selected region. This property is not available at design time.

Syntax

object.Clip [=string]

The Clip property syntax has these parts:

Part Description
object An object expression that evaluates to the ModHFGrid Control object.
string A string expression with the contents of the selected area.

Remarks

The string can hold the contents of multiple rows and columns. In string, a tab character, Chr (9), or the constant vbTab indicates a new cell in a row. Also in string, a carriage return, Chr (13), or the constant vbCR indicates the beginning of a new row. Use the Chr function or the vb constants to embed these characters in strings.

When placing data into a ModHFGrid, only the selected cells are affected. If there are more cells in the selected region than are described in the string, the remaining cells are left alone. If there are more cells described in the string than there are in the selected region, the unused portion of string is ignored.

Example

The following code example places the names "Ryan," "Josh," and "Gail" into the selected cells whenever the user selects a group of cells. When the user double-clicks, it clears the ModHFGrid. To run the program, press F5.

Private Sub Form1_Load ()
   ModHFGrid1.Rows =8
   ModHFGrid1.Cols =5
End Sub

Private Sub ModHFGrid1_MouseUp (Button As Integer, _
Shift as Integer, X As Single, Y As Single)
Dim myStr As String
   myStr ="Ryan" + Chr(9) + "Josh" + Chr(9) + "Gail"
   ModHFGrid1.Clip =myStr
End Sub

See Also

ColPosition, RowPosition Properties (ModHFGrid) | ModHFGrid Control