Project

General

Profile

test-brw-def-action-3.p

Sergey Ivanovskiy, 03/20/2018 09:59 AM

Download (1.15 KB)

 
1
DEF TEMP-TABLE tt FIELD f1 AS INTEGER
2
                  FIELD f2 AS character format "x(20)" 
3
                  FIELD f3 AS LOGICAL.
4

    
5
def var i as integer.
6
repeat i = 1 to 100:
7
   CREATE tt. tt.f1 = i. 
8
end.
9

    
10
DEFINE QUERY q FOR tt SCROLLING.
11
OPEN QUERY q FOR EACH tt.
12

    
13
DEF BROWSE br QUERY q 
14
DISPLAY 
15
     tt.f1 
16
     tt.f2 
17
     tt.f3 VIEW-AS TOGGLE-BOX
18
   WITH size-chars 50 by 10 TITLE "Static browse" separators.
19

    
20
DEF FRAME fr br SKIP(1) 
21
WITH TITLE "Frame" SIZE 70 BY 15 NO-LABELS three-d.
22

    
23
ENABLE ALL WITH FRAME fr.
24

    
25
on mouse-select-up of br in frame fr
26
do:
27
  message "mouse-select-up".
28
end.
29

    
30
on mouse-select-click of br in frame fr
31
do:
32
  /* this handler doesn't work in 4GL if mouse-select-up trigger is present */
33
  message "mouse-select-click".
34
end.
35

    
36
on default-action of br in frame fr
37
do:
38
  message "default action".
39
end.
40

    
41
on mouse-select-down of br in frame fr
42
do:
43
  message "mouse-select-down".
44
end.
45

    
46
on mouse-select-dblclick of br in frame fr
47
do:
48
  /* this handler doesn't work in 4GL if mouse-select-up trigger is present */
49
    message "mouse-select-dblclick".
50
end.
51

    
52

    
53
WAIT-FOR WINDOW-CLOSE OF DEFAULT-WINDOW.
54