Consultor Eletrônico



Kbase P119235: How to change the foreground colors of all the fields of a SmartViewer object?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/3/2006
Status: Unverified

GOAL:

How to change the foreground colors of all the fields of a SmartViewer object?

GOAL:

How to change the FGCOLOR attribute of all the fields of a SmartViewer object?

FIX:

Define a local displayFields procedure override with code along the following lines:
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/
DEFINE INPUT PARAMETER pcColValues AS CHARACTER NO-UNDO.
/* Code placed here will execute PRIOR to standard behavior. */
RUN SUPER( INPUT pcColValues).
/* Code placed here will execute AFTER standard behavior. */
DEFINE VARIABLE cAllFieldsHandles AS CHARACTER NO-UNDO.
DEFINE VARIABLE hFieldHandle AS HANDLE NO-UNDO.
DEFINE VARIABLE iCounter AS INTEGER NO-UNDO.
cAllFieldsHandles = DYNAMIC-FUNCTION('getFieldHandles':U IN TARGET-PROCEDURE).
DO iCounter = 1 TO NUM-ENTRIES(cAllFieldsHandles):
hFieldHandle = WIDGET-HANDLE (ENTRY(iCounter,cAllFieldsHandles)).
hFieldHandle:FGCOLOR = 9.
END.
END PROCEDURE.