Consultor Eletrônico



Kbase P69577: LARGE attribute for a READ-ONLY EDITOR sets a wrong BGCOLOR
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/06/2009
Status: Unverified

SYMPTOM(s):

LARGE attribute for a READ-ONLY EDITOR sets a wrong BGCOLOR

READ-ONLY BGCOLOR is ignored if the LARGE attribute is set to TRUE

READ-ONLY EDITOR BGCOLOR is not grayed out if the EDITOR has its LARGE attribute set to TRUE

FACT(s) (Environment):

OpenEdge 10.x
Windows

CAUSE:

Bug# OE00100488

FIX:

A workaround could be to get the disable color used in Windows and set that color for the Editor widget if its READ-ONLY attribute is set to TRUE. The following is an example of a workaround:

1- Define the external procedure which will return the RGB value for the disable color:

PROCEDURE GetSysColor EXTERNAL "user32".
DEFINE INPUT PARAMETER piColor AS LONG.
DEFINE RETURN PARAMETER rgbColor AS LONG.
END PROCEDURE.

Write the following code in the MAIN-BLOCK or initializeObject procedure:

DEFINE VARIABLE iColor AS INTEGER NO-UNDO.

/*15 is the default system color assigned for the object background
The default values for this color are:
Red: 212,
Green: 208,
Blue: 200*/
RUN GetSysColor (INPUT 15, OUTPUT iColor).

/*17 is used as an example, it could be anyone of the Progress COLOR-TABLE*/
COLOR-TABLE:SET-DYNAMIC(17,TRUE).

COLOR-TABLE:SET-RGB-VALUE(17, iColor).

/*If the editor is READ-ONLY the BGCOLOR should be assigned*/
ASSIGN editor-1:BGCOLOR = 17.