1 /* REXX script for rexxbgui.library: switch pages with tabs */
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)||,
40 bguimx
('switcher',,bguilist
('pnames','Single-Select','Multi-Select'),'T')||bguilayout
(LGO_FixMinHeight
,1)||,
43 bguiinfo
('infss',,'\ecSingle-Select Drag-n-Drop'lf
'Listview object.')||bguilayout
(LGO_FixMinHeight
,1)||,
44 bguilistview
('sslistv',,'LST','D'),
47 bguiinfo
('infss',,'\ecMulti-Select Drag-n-Drop'lf
'Listview object.')||bguilayout
(LGO_FixMinHeight
,1)||,
48 bguilistview
('mslistv',,'LST','D'),
53 bguibutton
('quit','_Quit')||,
55 )||bguilayout
(LGO_FixMinHeight
,1),
56 ,grspace
.normal
,grspace
.normal
)
60 call bguiset
(obj
.mslistv
,,LISTV_MultiSelect
,1)
61 call bguiaddmap
(obj
.switcher
,obj
.pages
,MX_Active
,PAGE_Active
)
63 a
=bguiwindow
('Listview DragNDrop',g
,30,30,,arg(1))
65 call bguiset
(obj
.switcher
,,BT_Key
,'09'x
)
67 if bguiwinopen
(a
)=0 then bguierror
(12)
70 do while bguiwinwaitevent
(a
,'ID')~
=id
.winclose
72 when id
=id
.winactive
then nop
73 when id
=id
.wininactive
then nop
74 when id
=id
.quit
then leave
75 when id
=id
.winclose
then nop
82 if rc~
=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
89 say '+++ Break at line' sigl