Share via


Clear Method (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.

Clears the contents of the ModHFGrid. This includes all text, pictures, and cell formatting. This method does not affect the number of rows and columns within the ModHFGrid.

Syntax

object.Clear

The Clear method syntax has one part:

Part Description
object An object expression that evaluates to the ModHFGrid Control object.

Remarks

To remove cells instead of just clearing them, use the RemoveItem method on each row to be removed.

Example

The following code places "Flex" into the current cell whenever the user clicks a cell. 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_Click ()
   ' Put text in current cell.
   ModHFGrid1.Text ="Flex"
End Sub

Private Sub ModHFGrid1.DblClick ()
   ModHFGrid1.Clear
End Sub

See Also

RemoveItem Method (ModHFGrid) | ModHFGrid Control