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 */
31 /* using ARexx feature: ,<newline> is translated to nothing */
32 /* the || are essential - any added space will cause trouble */
33 /* redefining the same ID makes previous buttons unaccessible */
34 /* do not redefine winclose etc. */
38 'info',,'\ec\ebARexx\e-b conversion of \ebList\e-b example',
39 )||bguilayout
(LGO_FixMinHeight
,1)||,
42 bguilistview
('sslistv',,'LST','D'),
43 ,,'F','Single-select')||,
45 bguilistview
('mslistv',,'LST','D'),
46 ,,'F','Multi-select'),
50 bguibutton
('quit','_Quit')||,
52 )||bguilayout
(LGO_FixMinHeight
,1),
53 ,grspace
.normal
,grspace
.normal
)
55 call bguiset
(obj
.mslistv
,,LISTV_MultiSelect
,1)
57 a
=bguiwindow
('Listview DragNDrop',g
,50,30,,arg(1))
59 if bguiwinopen
(a
)=0 then bguierror
(12)
61 do while bguiwinwaitevent
(a
,'ID')~
=id
.winclose
63 when id
=id
.winactive
then nop
64 when id
=id
.wininactive
then nop
65 when id
=id
.quit
then leave
66 when id
=id
.winclose
then nop
73 if rc~
=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
80 say '+++ Break at line' sigl