Consultor Eletrônico



Kbase P116454: How to change the COLUMN-LABEL attribute of a FRAME item defined in a FORM statement.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/1/2006
Status: Unverified

GOAL:

How to change the COLUMN-LABEL attribute of a FRAME item defined in a FORM statement.

FIX:

The COLUMN-ATTRIBUTE defined in a FORM statement may be changed using the DISPLAY statement. For example:
FORM
Customer.Name FORMAT "X(30)" COLUMN-LABEL "Old!Field!Label"
cVariable AS CHARACTER FORMAT "X(30)" COLUMN-LABEL "Old!Variable!Label"
WITH FRAME prompt-frame DOWN.
FOR EACH Customer NO-LOCK WHERE Custnum < 10:
cVariable = Customer.Country.
DISPLAY
Customer.Name COLUMN-LABEL "New!Field!Label"
cVariable COLUMN-LABEL "New!Variable!Label"
WITH FRAME prompt-frame DOWN.
DOWN WITH FRAME prompt-frame .
END.
Another way to achieve the same visual effect is to use the LABEL attribute of the FRAME items. Notice that this solution will not work with stacked COLUMN-LABEL because the LABEL attribute does not allow the stacked label syntax. For example:
FORM
Customer.Name FORMAT "X(30)" COLUMN-LABEL "Old Field Label"
cVariable AS CHARACTER FORMAT "X(30)" COLUMN-LABEL "Old Variable Label"
WITH FRAME prompt-frame DOWN.
ASSIGN
Customer.Name:LABEL IN FRAME prompt-frame = "New Field Label"
cVariable :LABEL IN FRAME prompt-frame = "New Variable Label".
FOR EACH Customer NO-LOCK WHERE Custnum < 10:
cVariable = Customer.Country.
DISPLAY
Customer.Name FORMAT "X(30)"
cVariable FORMAT "X(30)"
WITH FRAME prompt-frame DOWN.
DOWN WITH FRAME prompt-frame.
END.