Kbase 13487: LABEL doesn't move when a FILL-IN is moved -- "HOW TO"
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
LABEL doesn't move when a FILL-IN is moved -- "HOW TO"
When you move a fill-in widget on a window by setting its :X and :Y
attributes, you'll notice that the LABEL of the fill-in remains
in its original position. This is because the LABEL is itself
comprised of another widget, called a LITERAL.
When moving a fill-in, it is therefore necessary to move its label
at the same time. The following example shows one way to do this,
assuming that FILL-IN-1 is already defined:
DEF VAR h AS WIDGET-HANDLE NO-UNDO.
DEF VAR diff AS INTEGER.
h = fill-in-1:SIDE-LABEL-HANDLE.
diff = fill-in-1:X - h:X. /* calculate the difference in
X position of fill-in and label */
/* move the fill-in */
fill-in-1:X = 120.
fill-in-1:Y = 30.
/* move the label */
h:X = fill-in-1:X - diff.
h:Y = fill-in-1:Y.
Progress Software Technical Support Note # 13487