The response to OBJECT definition for a table is as follows:
[interrupt] response to TABLE_NAME
[ON_CLAUSE] [ACTION_STATEMENT...]
The following table lists the on clauses you can use with table objects to notify your application control actions and any effects that are specific to tables. The types of on clauses defined correspond to the built-in actions that the end-user can perform on a table object, as described earlier in this chapter.
If you issue a response to TABLE statement and omit an on clause, ESL responds the same as it does for on button1 down. Note that there are certain operations such as row or column deletion that your application must define if you want to provide them to your end-users. You do not need to provide response statements for those actions, since the application will know about them as soon as the user requests them.
For more information about the information available during a response, see Response Inquiry Built-in Functions.
Note the following general information about using the xcoord and ycoord built-in functions with responses:
For all table responses, xcoord and ycoord will be set to indicate the part of the table that is involved.
For a cell, both xcoord and ycoord will be non-zero.
For a column or column heading, xcoord will be non-zero and ycoord will be zero.
For a row or row heading, ycoord will be non-zero and xcoord will be zero.
If an empty part of the table is involved, then both will be zero.
For scrolling, xdelta and ydelta will also be set. They will contain the number of rows or columns that have been scrolled. xcoord and ycoord will contain the position of the cell displayed in the upper left-hand corner.
Action |
Behavior |
on button1 double click |
Response taken when button 1 is double-clicked in a cell, a row heading or a column heading, or when a user double-clicks button 1 in white space in a table. |
on button1 down |
Response taken when the selection status of a row or column is changed or the position of the current cell changes. This occurs when the user uses the mouse or keyboard to move the cursor to a new cell, selects or deselects a row or column, or clicks on a row or column heading (whether selection is allowed or not). If a click on a row or column heading causes both the cell position and the row or column selection to change, then there will be two responses, one for each event. |
on column resize |
Response taken when the user directly resizes a column. |
on edit |
Response taken when the user requests to edit the value of the current cell. After this response, when the user is done, ESL will trigger either an on validation or an on edit cancel response, but not both. |
on edit cancel |
Response taken when the user cancels the editing/entering of text in a cell, or if the user entered an illegal value in an integer or float cell. The cell value is not changed. |
on hscroll |
Response taken when the user scrolls the keyboard with either |
on vscroll |
the keyboard or the vertical or horizontal scroll bar. This is not taken if the table is not big enough to scroll. |
on validation |
Response taken when the user finishes editing a cell and the change is accepted. |
You can resize a table with its parent by using on resize, on maximize, and on restore clauses on the parent of the table and having them all call an action routine to adjust the table and other controls appropriately.