1
|
define variable hGrid as handle no-undo.
|
2
|
define variable hCol1 as handle no-undo.
|
3
|
define variable hCol2 as handle no-undo.
|
4
|
define variable hCol3 as handle no-undo.
|
5
|
def var str as char.
|
6
|
def var i as integer.
|
7
|
def temp-table tt1 field f1 as logical //VIEW-AS COMBO-BOX LIST-ITEMS "a,b,c,d"
|
8
|
field f2 as char format "x(30)"
|
9
|
field f3 as char format "x(10)"
|
10
|
field f4 as char format "x(10)".
|
11
|
|
12
|
repeat i = 1 to 5:
|
13
|
create tt1. tt1.f1 = true. tt1.f2 = "Line " + string(i).
|
14
|
end.
|
15
|
|
16
|
|
17
|
def var hGridSmall as handle.
|
18
|
def var fin as handle.
|
19
|
|
20
|
define query qtt1 for tt1 scrolling.
|
21
|
open query qtt1 for each tt1.
|
22
|
|
23
|
|
24
|
define frame fr
|
25
|
with no-labels size 80 by 20 title "frame 1".
|
26
|
|
27
|
create browse hGrid
|
28
|
assign frame = frame fr:HANDLE
|
29
|
SEPARATOR-FGCOLOR = 15
|
30
|
ROW-MARKERS = NO
|
31
|
COLUMN-MOVABLE = YES
|
32
|
COLUMN-RESIZABLE = YES
|
33
|
MULTIPLE = YES
|
34
|
Y = 30
|
35
|
X = 10
|
36
|
WIDTH-chars = 60
|
37
|
HEIGHT-chars = 9
|
38
|
QUERY = query qtt1:HANDLE
|
39
|
READ-ONLY = NO
|
40
|
EXPANDABLE = TRUE
|
41
|
FGCOLOR = ?
|
42
|
BGCOLOR = 15
|
43
|
SENSITIVE = YES
|
44
|
NAME = "fselbrow":U.
|
45
|
|
46
|
create fill-in fin
|
47
|
assign frame = frame fr:HANDLE
|
48
|
Y = 280
|
49
|
X = 10.
|
50
|
|
51
|
|
52
|
hCol1 = hGrid:add-like-column("tt1.f1").
|
53
|
//hCol1 = hGrid:add-like-column("tt1.f1", 1, "TOGGLE-BOX").
|
54
|
hCol1:read-only = false.
|
55
|
hCol1:width = 10.
|
56
|
//hCol2 = hGrid:add-like-column("tt1.f2", 2, "DROP-DOWN-LIST").
|
57
|
hCol2 = hGrid:add-like-column("tt1.f2").
|
58
|
hCol2:read-only = false.
|
59
|
hCol3 = hGrid:add-like-column("tt1.f3").
|
60
|
//hCol3:read-only = false.
|
61
|
|
62
|
hGrid:visible = true.
|
63
|
|
64
|
enable all with frame fr.
|
65
|
|
66
|
def var cnt as integer.
|
67
|
|
68
|
on "mouse-select-dblclick" of hGrid persistent run proc1 in this-procedure ("left-double", "browse").
|
69
|
|
70
|
message "doubleclick".
|
71
|
|
72
|
procedure proc1:
|
73
|
def input parameter p1 as char.
|
74
|
def input parameter p2 as char.
|
75
|
|
76
|
cnt = cnt + 1.
|
77
|
message p1 p2 cnt.
|
78
|
end.
|
79
|
|
80
|
wait-for close of current-window.
|