Feature #12037
SYSTEM-DIALOG COLOR ... UPDATE: repaint widgets using the changed colour
0%
History
#1 Updated by Greg Shah about 1 month ago
SYSTEM-DIALOG COLOR ... UPDATE: repaint widgets using the changed colour¶
Project: User Interface
Problem¶
SYSTEM-DIALOG COLOR n UPDATE flag lets the user change entry n of the colour table. In the 4GL, every widget drawn with that colour number is immediately redrawn with the new colour.
FWD implements the dialog and returns the selection, but does not repaint: ThinClient.chooseColor carries the TODO "all widgets (part of the specified window) having this color are immediately redrawn". Widgets already on screen keep the old colour until something else repaints them. The gap marking records the statement as Full / Full (R).
This matters most on colour configuration screens, whose whole purpose is to show the user the colour they just picked. A typical screen assigns the colour number to a sample widget, opens the dialog, and then reads the colour back:
fi_sample:BGCOLOR = 20.
SYSTEM-DIALOG COLOR 20 UPDATE lChanged.
IF lChanged THEN
ASSIGN iRed = COLOR-TABLE:GET-RED-VALUE(20)
...
fi_sample:BGCOLOR = 20.
Work¶
- Establish on OpenEdge which widgets are redrawn when an entry changes: those in the current window only or in every window, foreground and background, and widgets whose colour comes from their frame.
- Implement the repaint for those widgets in the GUI drivers.
- Check that reassigning the same colour number to a widget, as above, repaints it with the new value.
- Check that
COLOR-TABLEreports the new value, and that a change made withCOLOR-TABLE:SET-RGB-VALUEbehaves the same way. - Update the gap marking.
Testcases¶
With an OpenEdge baseline: a window with several widgets using one colour number as foreground and background, change it through the dialog, and verify what is redrawn.