Consultor Eletrônico



Kbase P76891: How to change browse column-labels at runtime
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/31/2005
Status: Unverified

GOAL:

How to change browse column-labels at runtime

FACT(s) (Environment):

Use FIRST-COLUNM and NEXT-COLUMN properties of the Browse widget handle
to locate the desired column then assign label attribute.
Example:
DEF VAR hB AS HANDLE.
DEF VAR hC as HANDLE.

hB = BROWSE {&BROWSE-NAME}:HANDLE.
hC = hB:FIRST-COLUMN.

DO WHILE VALID-HANDLE( hC ):
if( hC:NAME = "myFieldHere" ) THEN hC:LABEL = "myNewLabel".
/* pay attention to extent columns in the browse since */
/* NAME attribute has the same value for all items */
/* in which case use an integer var to get to right item */
/*
if( hC:NAME = "myFieldHere" ) THEN DO:
vi = vi + 1.
IF( vi = ThisInt ) hC:LABEL = "myNewLabel".
END.
*/
hC = hC:NEXT-COLUMN.
END.