Can we add custom color(with RGB value) to background of widgets in progress 4gl ? I want to add orange color to the background. Orange color (with RGB value 255,165,0) is not available in the progress ADE and I don't want to edit the *.ini file.
Can we add custom color(with RGB value) to background of widgets in progress 4gl
92 Views Asked by Abhinit Kumar Das At
2
There are 2 best solutions below
0
On
here a function example with COLOR-TABLE system handle
the return value is a new number in the COLOR-TABLE with your rgb values
FUNCTION SetClrRgbVal RETURNS INTEGER (iRgbVal AS INTEGER):
DEFINE VARIABLE iCnt AS INTEGER NO-UNDO.
COLOR-TABLE:NUM-ENTRIES = 255.
DO iCnt = COLOR-TABLE:NUM-ENTRIES - 1 TO 1 BY -1:
IF COLOR-TABLE:GET-RGB-VALUE(iCnt) = 0 OR COLOR-TABLE:GET-RGB-VALUE(iCnt) = iRgbVal THEN DO:
COLOR-TABLE:SET-DYNAMIC(iCnt,TRUE).
COLOR-TABLE:SET-RGB-VALUE(iCnt, iRgbVal).
RETURN iCnt.
END.
END.
RETURN ?.
END.
and a widget with a orange color
edColor:BGCOLOR IN FRAME {&FRAME-NAME} = SetClrRgbVal(RGB-VALUE(255,165,0)).
You can use the COLOR-TABLE system handle to manipulate colors at runtime through code.
https://community.progress.com/s/article/howtousespecificRGBcolorvaluesforwidget
But why don't you want to edit the progress.ini file? It's the place where colors and font's along with the PROPATH of an application are defined.
Progress colors are defined in the progress.ini file used (-basekey ini, -ininame startup parameters) in the colors section:
You can use colors 16 and up for your own purpose.
When you're not using an .ini file, those settings are in the registry: