1 /* REXX script for rexxbgui.library: List example */
3 if ~show
('l','rexxbgui.library') then do
4 if ~addlib
('rexxbgui.library',0,-30) then do
11 call bguiopen
() /* causes error 12 if it did not work */
12 /* supply a second argument for a '0' return code instead of an ARexx
15 signal on syntax /* important: bguiclose() MUST be called */
30 lst
.i
='Entry' i
||tab
||d2c(i
+64)
33 /* using ARexx feature: ,<newline> is translated to nothing */
34 /* the || are essential - any added space will cause trouble */
35 /* redefining the same ID makes previous buttons unaccessible */
36 /* do not redefine winclose etc. */
40 'info',,'\ec\ebRexxBGUI\e-b: multi-column listviews',
41 )||bguilayout
(LGO_FixMinHeight
,1)||,
44 bguilistview
('sslistv',,'LST','D',2 80 20)||setlsttoms
(),
45 ,,'F','Single-select')||,
47 bguilistview
('mslistv',,'LST','D',2 90 10),
48 ,,'F','Multi-select'),
52 bguibutton
('quit','_Quit')||,
54 )||bguilayout
(LGO_FixMinHeight
,1),
55 ,grspace
.normal
,grspace
.normal
)
57 call bguiset
(obj
.mslistv
,,LISTV_MultiSelect
,1)
59 a
=bguiwindow
('Listview DragNDrop',g
,50,30,,arg(1))
61 if bguiwinopen
(a
)=0 then bguierror
(12)
63 do while bguiwinwaitevent
(a
,'ID')~
=id
.winclose
65 when id
=id
.winactive
then nop
66 when id
=id
.wininactive
then nop
67 when id
=id
.quit
then leave
68 when id
=id
.winclose
then nop
75 if rc~
=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
82 say '+++ Break at line' sigl