Project

General

Profile

focus_order.p

Sergey Ivanovskiy, 03/09/2016 12:37 PM

Download (933 Bytes)

 
1
def var h1 as handle.
2
def var h2 as handle.
3

    
4
create window h1 assign title = "h1".
5
create window h2 assign title = "h2".
6

    
7
def var i1   as int label "Number".
8
def var str1 as char label "Text".
9

    
10
def button ok1 label "ok".
11

    
12
form i1 skip str1 skip ok1 with frame f1 title "fh1".
13

    
14
def var i2   as int.
15
def var str2 as char.
16

    
17
def button ok2 label "ok".
18

    
19
form i2 skip str2 skip ok2 with frame f2 title "fh2".
20

    
21

    
22
enable i1 str1 ok1 with frame f1 in window h1.
23
enable i2 str2 ok2 with frame f2 in window h2.
24

    
25
current-window = h1.
26

    
27
on "choose" of ok1 in frame f1 do:
28
   message "ok1" in window h1.
29
end.
30

    
31
on "choose" of ok2 in frame f2 do:
32
   message "ok2" in window h2.
33
end.
34

    
35
view h1.
36
view h2.
37

    
38
on "1" anywhere do:
39
  current-window = h1.
40
end.
41

    
42
on "2" anywhere do:
43
  current-window = h2.
44
end.
45

    
46
on "3" anywhere do:
47
  update i1 str1 with frame f1.
48
end.
49

    
50
on "4" anywhere do:
51
  update i2 str2 with frame f2.
52
end.
53

    
54
wait-for close of current-window.