Kbase P105815: How to synchronize the positions of a FILL-IN and its label when the FILL-IN is moved?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/19/2007 |
|
Status: Unverified
GOAL:
How to synchronize the positions of a FILL-IN and its label when the FILL-IN is moved?
FIX:
The following sample code moves all FILL-IN widgets and their LABELS 10 PIXELS along the X-axis and 20 PIXELS along the Y-axis:
DEFINE VARIABLE hFillin AS HANDLE NO-UNDO.
DEFINE VARIABLE hLabel AS HANDLE NO-UNDO.
DEFINE VARIABLE idx AS INTEGER NO-UNDO.
DEFINE VARIABLE idy AS INTEGER NO-UNDO.
ASSIGN
hFillin = FRAME {&FRAME-NAME}:FIRST-CHILD
hFillin = hFillin:FIRST-CHILD
idx = 10
idy = 20.
DO WHILE VALID-HANDLE(hFillin):
IF hFillin:TYPE = "FILL-IN" THEN
ASSIGN
hLabel = hFillin:SIDE-LABEL-HANDLE
hFillin:X = hFillin:X + idx
hFillin:Y = hFillin:Y + idy
hLabel:X = hLabel:X + idx
hLabel:Y = hLabel:Y + idy.
ASSIGN hFillin = hFillin:NEXT-SIBLING.
END.