Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Delete the contents of an object.

For Graphical Regions, Image Regions, Textual Regions, and Keys:

clear [graphics] {OBJECT_NAME|CLASS_NAME}

For Dialog Regions, Dialog Boxes, and Dialog Controls:

clear {OBJECT_NAME|CLASS_NAME}

For Tables:

clear

[ row ROW_ID of

| column COL_ID of

| column COL_ID of row ROWNUM of ]

TABLE_NAME

graphics

Delete the contents of an object, but do not delete (or affect in any way) any of the object's children. Therefore, you do not need to first delete the object's children from any classes to which they belong. If you omit this keyword, ESL deletes the existing drawing statements for the object and deletes all of its children.

OBJECT_NAME

The identifier for an object.

CLASS_NAME

The identifier for a class of objects.

ROW_ID

The identifier for a row.

COL_ID

The identifier for a column.

ROWNUM

The number of a row.

TABLE_NAME

The identifier for a table.

Description

Since a textual region's drawing statements are distinct from graphical drawing statements, do not specify a clear statement for a class of objects that includes textual regions as well as graphical objects.

If you do not select graphics, but wish to delete the contents of an object, you should first delete its children from any classes to which they belong, using the delete from class action statement.

Clearing the contents of push buttons, radio buttons, check boxes, list boxes, entry fields, group boxes, spin buttons, and static text clears only the text associated with the object, not the graphics. Clearing the contents of a numeric spin button sets the minimum and maximum values to 0. A slider is unaffected by the clear statement.

Clearing the contents of a dialog box deletes all the dialog controls that are its children.

If you omit a row or column specifier when clearing a table, ESL removes all rows from the table but does not change the attributes of its columns. The parent of the table may not be temporary and invisible when you issue this statement, or it will be ignored.

When you clear a cell in a table, ESL sets its value to 0, false, or "", depending on its type. When you clear a row, the row remains, but ESL sets each cell in the row to 0, false, or "", depending on its type. When you clear a column, ESL clears each cell in the column. See Section 11.2 in the Programming Guide for more information on column operations.

Example

 

response to Undo_PB

 clear Stop_Key

 

response to Send_PB

 clear Start_Key in Box_DB

 

response to item EastRegion_MC in PrimaryWindow_GR

 clear ClientNames_LB

 read file "eastreg.fil" into ClientNames_LB

 

response to item WestRegion_MC in PrimaryWindow_GR

 clear column Names of ClientTable_TBL

 read file "westreg.fil" into ClientTable_TBL

See Also

change Action Statement

delete from class Action Statement