DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
ETI forms

Moving a field

ETI provides the following function to move an existing disconnected field to a new location.

SYNOPSIS

   int move_field (field, firstrow, firstcol)
   FIELD * field;
   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:


E_SYSTEM_ERROR -
system error

E_BAD_ARGUMENT -
NULL field or firstrow/firstcol < 0

E_CONNECTED -
connected field

Next topic: Changing the current default values for field attributes
Previous topic: Dynamically growable fields

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004