Progress
Language Reference


FRAME-INDEX Function

Interfaces
OS
SpeedScript
All
All
No

During a data entry statement, returns the subscript of the array element of the input field that the cursor is in. At other times, returns the subscript of the array element the cursor was in.

The FRAME-INDEX function is particularly useful if you want to provide the user with help for the input array element being edited.

SYNTAX

FRAME-INDEX 

EXAMPLE

In this example, the FRAME-INDEX function uses the cursor position to determine which option you have chosen.

r-frindx.p
DEFINE VARIABLE menu AS CHARACTER EXTENT 3.
DO WHILE TRUE:
  DISPLAY
    "1. Display Customer Data" @ menu[1] SKIP
    "2. Display Order Data"    @ menu[2] SKIP
    "3. Exit"                  @ menu[3] SKIP
    WITH FRAME choices NO-LABELS.
  CHOOSE FIELD menu AUTO-RETURN WITH FRAME choices
    TITLE "Demonstration Menu" WITH CENTERED ROW 10.
  HIDE FRAME choices.
  IF FRAME-INDEX EQ 1 THEN 
    MESSAGE "You picked option 1.".
  ELSE IF FRAME-INDEX EQ 2 THEN 
    MESSAGE "You picked option 2.".
  ELSE IF FRAME-INDEX EQ 3 THEN LEAVE.
END. 

NOTES

SEE ALSO

Frame Phrase, FRAME-DB Function, FRAME-FIELD Function, FRAME-FILE Function


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