|
|
ETI provides the following function to move an existing disconnected field to a new location.
SYNOPSIS
int move_field (field, firstrow, firstcol) FIELDfield; int firstrow; int firstcol;
``Example shifting all form fields a given number of rows'' shows one way you might use function move_field. Function shift_fields receives the int value updown, which it uses to change the row number of each field in a given field pointer array. You could, of course, shift the columns in like fashion.
void shift_fields (f, updown)
FIELD ** f;
int updown; /* signed number of rows to shift */
{
int rows, cols, frow, fcol, nrow, nbuf;
while (*f)
{
/* field_info fetches the values of the field parameters */
field_info (*f, &rows, &cols, &frow, &fcol, &nrow, &nbuf);
move_field (*f, frow + updown, fcol);
++f;
}
}
Example shifting all form fields a given number of rows
See ``Obtaining field size and location information'' for more on field_info used in this example.
If successful, function move_field returns E_OK. If not, it returns one of the following: