Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## FRAME-LINE function

> Returns an integer value that represents the current logical line number in a down frame.

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     FRAME-LINE [ ( frame ) ]

> ``frame``

> The frame name that you are trying to determine a line number for. If you do not supply a frame name, the FRAME-LINE function uses the default frame for the block that contains the FRAME-LINE function. If the FRAME-LINE function is in a DO block, the function uses the default frame scoped to the block that contains the DO block.

> Example

> This procedure lists customers and allows the user to delete customers one at a time. When the user presses GET to delete a customer, the procedure displays an overlay frame below the last customer displayed. The overlay frame prompts “Do you want to delete this customer?” The user answers yes or no. Progress calculates the position of the overlay frame from the upper-right corner of the frame and the current line within the frame. That is, FRAME-ROW + 3 + FRAME-LINE gives the position of the current line in the frame, taking into account the three lines for the frame box and the labels. The prompt is placed five lines below the current line.

> r-frline.p
>     DEFINE VARIABLE ans AS LOGICAL
>                         LABEL "Do you want to delete this customer ?".

>     IF KBLABEL("GET") = "GET"
>     THEN ON F3 GET.

>     STATUS INPUT "Enter data, or use the " + KBLABEL("get")
>                + " key to delete the customer".

>     get-cust:
>           FOR EACH customer WITH 10 DOWN:
>             UPDATE cust-num name credit-limit
>            editing:
>               READKEY.
>               IF KEYFUNCTION(lastkey) = "get"
>               THEN DO:
>                UPDATE ans WITH ROW FRAME-ROW + 3 + FRAME-LINE + 5
>                        COLUMN 10 SIDE-LABELS OVERLAY FRAME del-frame.
>                IF ans
>                THEN DO:
>                   DELETE customer.
>                   NEXT get-cust.
>               END.
>             END.
>             APPLY LASTKEY.
>          END.
>     END.

> #### Notes

> - If there is a down pending for a frame, the FRAME-LINE function returns a value equal to FRAME-LINE + 1.

> - The FRAME-LINE function counts an underline row as a logical line. A logical line corresponds to one iteration in a down frame and can contain more than one physical line.

> - The FRAME-LINE function returns a value of 0 if the frame is not in view when the function is evaluated.

> #### See also

> Frame phrase, FRAME-COL function, FRAME-DOWN function, FRAME-ROW function

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