Project

General

Profile

height-chars-4070.p

Sergey Ivanovskiy, 10/22/2026 01:55 PM

Download (1.42 KB)

 
1
/*------------------------------------------------------------------------------
2
  height-chars-4070.p     FRAME HEIGHT-CHARS below the height its widgets need
3

    
4
  A frame with three fields on three rows is shown, then its HEIGHT-CHARS is set
5
  to 1.  OpenEdge raises warning 4070 ("Unable to set the HEIGHT of the FRAME
6
  fInfo too small to contain all visible widgets.") in an alert box.
7
  The heights before and after are written to height-chars-4070.log and shown
8
  at the end.
9
------------------------------------------------------------------------------*/
10

    
11
DEFINE VARIABLE cA      AS CHARACTER NO-UNDO LABEL "A" FORMAT "x(8)" INITIAL "first".
12
DEFINE VARIABLE cB      AS CHARACTER NO-UNDO LABEL "B" FORMAT "x(8)" INITIAL "second".
13
DEFINE VARIABLE cC      AS CHARACTER NO-UNDO LABEL "C" FORMAT "x(8)" INITIAL "third".
14
DEFINE VARIABLE dBefore AS DECIMAL   NO-UNDO.
15
DEFINE VARIABLE dAfter  AS DECIMAL   NO-UNDO.
16

    
17
DEFINE FRAME fInfo
18
   cA SKIP
19
   cB SKIP
20
   cC
21
   WITH SIDE-LABELS THREE-D.
22

    
23
/* warnings and errors go to an alert box, independent of the message area */
24
SESSION:SYSTEM-ALERT-BOXES = yes.
25

    
26
DISPLAY cA cB cC WITH FRAME fInfo.
27
dBefore = FRAME fInfo:HEIGHT-CHARS.
28

    
29
FRAME fInfo:HEIGHT-CHARS = 1.
30

    
31
dAfter = FRAME fInfo:HEIGHT-CHARS.
32

    
33
OUTPUT TO "height-chars-4070.log".
34
PUT UNFORMATTED "HEIGHT-CHARS before: " STRING(dBefore) " after: " STRING(dAfter) SKIP.
35
OUTPUT CLOSE.
36

    
37
MESSAGE "HEIGHT-CHARS before:" dBefore "after:" dAfter VIEW-AS ALERT-BOX.