Kbase P98966: How change column Labels to Field Names in a DOWN frame
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/17/2004 |
|
Status: Unverified
GOAL:
How change column Labels to Field Names in a DOWN frame
GOAL:
Is it possible to change Column Labels to Field Names in a DOWN frame?
FIX:
The following code shows how to change the column labels to field names in a DOWN frame:
DEFINE VARIABLE h AS HANDLE NO-UNDO.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEF FRAME f WITH 18 DOWN.
RUN changeColLabelsToFieldName (FRAME f:HANDLE).
i = 0.
FOR EACH customer NO-LOCK:
DISPLAY customer EXCEPT comment WITH FRAME f.
i = i + 1.
IF i = 8 THEN LEAVE.
END.
WAIT-FOR CLOSE OF THIS-PROCEDURE.
PROCEDURE changeColLabelsToFieldName:
DEFINE INPUT PARAMETER hFrame AS HANDLE NO-UNDO.
/* this block automatically changes the column labels to the name of the field */
h = hFrame:FIRST-CHILD. /* first field group = first iteration */
h = h:FIRST-CHILD. /* first widget => first field */
DO WHILE h <> ?:
h:LABEL = h:NAME.
h = h:NEXT-SIBLING.
END.
END PROCEDURE.