Project

General

Profile

8770.p

Vladimir Tsichevski, 05/14/2024 03:36 PM

Download (1.13 KB)

 
1
// Demonstrates ENTRY/EVENT signals when a window receives focus
2
 
3
// In this demo, 3 frames are defined with totally 2 buttons:
4
// 1. 'outerframe': an outermost frame
5
// 2-3. two frames in 'outerFrame':
6
//    # 'innerFrame' with the 'focusable2' button.
7
//    # 'innerFrame2' with the 'focusable3' button.
8

    
9
DEFINE FRAME outerFrame
10
WITH SIZE 80 BY 15
11
AT COL 1 ROW 1.
12

    
13
DEFINE BUTTON focusable2.
14
DEFINE FRAME innerFrame
15
  focusable2
16
  WITH SIZE 60 BY 2
17
  AT COLUMN 1 ROW 1.
18
FRAME innerFrame:FRAME = FRAME outerFrame:HANDLE.
19

    
20
DEFINE BUTTON focusable3.
21
DEFINE FRAME innerFrame2
22
  focusable3
23
  WITH SIZE 60 BY 2
24
  AT COLUMN 1 ROW 5.
25
FRAME innerFrame2:FRAME = FRAME outerFrame:HANDLE.
26

    
27
{functions.i}
28

    
29
{printEntryLeave.i &widget="FRAME outerFrame"}
30
{printEntryLeave.i &widget="FRAME innerFrame"}
31
{printEntryLeave.i &widget="FRAME innerFrame2"}
32

    
33
{printEntryLeave.i &widget="focusable2"}
34
{printEntryLeave.i &widget="focusable3"}
35

    
36
ON ENTRY OF focusable2 DO:
37
   RUN PrintEntry(focusable2:HANDLE).
38
   RETURN NO-APPLY.
39
END.
40

    
41
ENABLE focusable2 WITH FRAME innerFrame.
42
ENABLE focusable3 WITH FRAME innerFrame2.
43
VIEW FRAME outerFrame.
44
WAIT-FOR GO OF FRAME outerFrame.
45