-
Notifications
You must be signed in to change notification settings - Fork 9
/
browse-dblclick.prg
51 lines (28 loc) · 937 Bytes
/
browse-dblclick.prg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
#include {% TWebInclude() %}
function main()
local o, oWeb, oCol, oBrw
local aRows := LoadData()
DEFINE WEB oWeb TITLE 'Test Browse' ICON 'images/favicon.ico' TABLES INIT
DEFINE FORM o
HTML o INLINE '<h3>Test Browse - dblclick event</h3><hr>'
INIT FORM o
ROW o
COL o GRID 12
DEFINE BROWSE oBrw ID 'ringo' HEIGHT 400 DBLCLICK 'ViewRow' OF o
ADD oCol TO oBrw ID 'first' HEADER 'First' ALIGN 'right'
ADD oCol TO oBrw ID 'last' HEADER 'Last' SORT
ADD oCol TO oBrw ID 'age' HEADER 'Age' WIDTH 70
INIT BROWSE oBrw DATA aRows
ENDCOL o
ENDROW o
HTML o
<script>
function ViewRow( e, row ) {
MsgInfo( row.first.trim() + ' ' + row.last + '<br>' + row.street + ' ' + row.city, 'Customer' )
}
</script>
ENDTEXT
END FORM o
retu nil
{% LoadFile( 'loaddata.prg' ) %}