browse-insert-from-fillin.p
1 |
DEF TEMP-TABLE tt FIELD f1 AS integer |
---|---|
2 |
field f2 as logical. |
3 |
|
4 |
def var i as integer. |
5 |
def var str as char. |
6 |
def buffer xtt for tt. |
7 |
|
8 |
repeat i = 1 to 20: |
9 |
create tt. tt.f1 = i. tt.f2 = false. |
10 |
end. |
11 |
|
12 |
DEFINE QUERY q FOR tt SCROLLING. |
13 |
OPEN QUERY q FOR EACH tt. |
14 |
|
15 |
DEF BROWSE brws QUERY q |
16 |
DISPLAY |
17 |
tt.f1 width-chars 10 |
18 |
tt.f2 width-chars 10 |
19 |
enable all |
20 |
WITH size 30 by 10 TITLE "Static browse" separators. |
21 |
|
22 |
DEF FRAME fr brws skip str |
23 |
WITH TITLE "Frame" SIZE 70 BY 20 NO-LABELS. |
24 |
|
25 |
on "i" anywhere do: |
26 |
browse brws:insert-row("after"). |
27 |
end. |
28 |
|
29 |
ENABLE ALL WITH FRAME fr. |
30 |
|
31 |
message "click on the bottom fill-in, press 'i', note the in-row fill-in is drawn". |
32 |
|
33 |
WAIT-FOR WINDOW-CLOSE OF DEFAULT-WINDOW. |
34 |
|
35 |
|
36 |
|