GRID.Clear |
![]() ![]() |
state = GRID.Clear( BYVAL nControl AS INTEGER, BYVAL nRow AS INTEGER, BYVAL nCol AS INTEGER ) AS INTEGER
state = GRID.Clear( BYVAL nControl AS INTEGER, BYVAL minrow AS INTEGER, BYVAL mincol AS INTEGER, BYVAL maxrow AS INTEGER, BYVAL maxcol AS INTEGER ) AS INTEGER
state = GRID.Clear( BYVAL nControl AS INTEGER, BYVAL strName AS STRING ) AS INTEGER
Clears the contents of the specified cell or range of cells. This will not delete or change format or property of any cells. It only replaces the contents of the cell with empty string (if string format), or 0 if a numeric format. The function return TRUE if successful.
Example:
OPTION BASE 1
DIM nControl AS INTEGER nControl = GRID.Create( "Graph", WS_VISIBLE, 0, 0, 320, 240, NULL, 1 )
GRID.RowCount( nGrid, 32 ) GRID.ColumnCount( nGrid, 8 ) GRID.SetDefaultType( nGrid, MG_CELL_INTEGER )
' Initialize Grid
DIM row AS INTEGER DIM col as INTEGER DIM num AS INTEGER
num = 1
FOR row = 1 TO 32 FOR col = 1 TO 8 GRID.ItemInteger( nControl, row, col, num ) ENDFOR ENDFOR
' Update Grid GRID.Refresh( nControl )
' Clear 2nd Row FOR col 1 TO 8 GRID.Clear( nControl, 2, col ) ENDFOR
' Update Grid Again GRID.Refresh( nControl )
GRID.Close( nControl ) |