Progress
Language Reference


AT Phrase

Interfaces
OS
SpeedScript
All
All
Yes

The AT phrase of the Format phrase allows explicit positioning of frame objects, either by row and column or by pixels. The AT phrase of the Frame phrase allows explicit positioning of frames with windows or parent frames.

SYNTAX

AT { COLUMN column | COLUMN-OF reference-point } 
   { ROW row | ROW-OF reference-point }
   [ COLON-ALIGNED | LEFT-ALIGNED | RIGHT-ALIGNED ] 

AT { X x | X-OF reference-point }
   { Y y | Y-OF reference-point } 
   [ COLON-ALIGNED | LEFT-ALIGNED | RIGHT-ALIGNED ] 

AT n 

n

The column, measured in character units. This option is not supported for the Frame phrase. You cannot use the alignment options with this syntax. If you use this option, Progress chooses the row based on the previous widget and form item layout of the frame. For information on form items, see the DEFINE FRAME Statement or FORM Statement.

COLUMN column

The column, measured in character units.

COLUMN-OF reference-point

Indicates the column position of the field relative to another field-level widget previously defined in the frame. This option is not supported for the Frame phrase. This is the syntax for reference-point.

SYNTAX
widget [ { + | - } offset ] 

In this syntax, widget is a reference to a field-level widget previously defined in the frame, and offset is a positive decimal value. For example, if widget is positioned at COLUMN 10, then COLUMN-OF widget + 2.5 positions the field at column 12.5.

X x

The X pixel coordinate.

X-OF reference-point

Indicates the X co-ordinate of the field relative to another field-level widget previously defined in the frame. This option is not supported for the Frame phrase. The co-ordinate is expressed as the co-ordinate of a widget previously defined in the frame, plus or minus an offset. The offset must be either a constant or preprocessor constant and must be a positive integer.

ROW row

The row, measured in character units.

ROW-OF reference-point

Indicates the row of the field relative to another field-level widget previously defined in the frame. This option is not supported for the Frame phrase. The row is expressed as the row of a widget previously defined in the frame, plus or minus an offset. The offset must be either a constant or preprocessor constant and must be a positive decimal value.

Y y

The Y pixel coordinate.

Y-OF reference-point

Indicates the Y co-ordinate of the field relative to another field-level widget previously defined in the frame. This option is not supported for the Frame phrase. The co-ordinate is expressed as the co-ordinate of a widget previously defined in the frame, plus or minus an offset. The offset must be either a constant or preprocessor constant and must be a positive integer.

COLON-ALIGNED | LEFT-ALIGNED | RIGHT-ALIGNED

Specifies whether to align the left edge of the field, right edge of the field, or the colon of the field label, with the specified position. This option can only be used in combination with the ROW and COLUMN options. This option is not supported for the Frame phrase.

EXAMPLES

The following example uses the AT phrase to position fields within a frame.

r-at.p
DEFINE FRAME order-info
  order.cust-num   AT ROW 2 COLUMN 8
  customer.name    AT ROW 2 COLUMN 18
  order.order-num  AT ROW 2 COLUMN 50
  order.order-date AT ROW 2 COLUMN 65
  WITH TITLE "Order Information".
 
FOR EACH order NO-LOCK BREAK BY order.cust-num WITH FRAME order-info:
  IF FIRST-OF(order.cust-num) THEN
  DO: 
    FIND customer OF order NO-LOCK.
    DISPLAY order.cust-num customer.name.
  END.
  DISPLAY order.order-num order.order-date.
 
END. 

The following example uses relative positioning to position fields relative to the cust-num field.

r-at1.p
DEFINE FRAME order-info
  order.cust-num   AT X 50 Y 14
  customer.name    AT X-OF order.cust-num + 100 Y 14 
  order.order-num  AT X-OF order.cust-num + 225 Y 14
  order.order-date AT X-OF order.cust-num + 320 Y 14
  WITH TITLE "Order Information" NO-LABELS.
 
FOR EACH order NO-LOCK
  BREAK BY order.cust-num WITH FRAME order-info:
  IF FIRST-OF(order.cust-num) THEN
  DO: 
    FIND customer OF order NO-LOCK.
    DISPLAY order.cust-num customer.name.
  END.
  DISPLAY order.order-num order.order-date.
END. 

NOTES

SEE ALSO

DEFINE FRAME Statement, FORM Statement, Frame Phrase


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095