Bringing ChocolateCaste-0.7 into the main branch.
[AROS-Contrib.git] / bgui / test / test12.rx
blob84cf31b894d3f9c4028008b359dbf37c700d496e
1 /* REXX */
2 /* REXX script for rexxbgui.library: test bug 57 */
4 if ~show('l','rexxbgui.library') then do
5 if ~addlib('rexxbgui.library',0,-30) then exit(20)
6 end
8 call bguiopen()
10 signal on syntax
12 call bguilist("mxopts_",'None','Option 1','Option 2','Option 3','Option 4','Option 5','Option 6')
14 g=bguivgroup(,
15 bguihgroup(,
16 bguivgroup(,
17 bguimx('left','Left','mxopts_','R')bguilayout(LGO_FixMinWidth, 1,LGO_FixMinHeight, 1),
18 ,-3,'F')||,
19 bguivgroup(,
20 bguimx('center','Center','mxopts_','R')bguilayout(LGO_FixMinWidth, 1,LGO_FixMinHeight, 1),
21 ,-3,'F')||,
22 bguivgroup(,
23 bguimx('right','Right','mxopts_','R')bguilayout(LGO_FixMinWidth, 1,LGO_FixMinHeight, 1),
24 ,-3,'F'),
25 )||,
26 bguihgroup(,
27 bguivarspace(10)||,
28 bguibutton('quit','_Quit')bguilayout(LGO_FixMinWidth, 1,LGO_FixMinHeight, 1)||,
29 bguivarspace(10),
30 )||bguilayout(LGO_FixMinHeight,1),
31 ,-2,-2)
33 grp.0 = 'left'
34 grp.1 = 'center'
35 grp.2 = 'right'
37 do src = 0 to 2
38 do dst = 0 to 2
39 if src = dst then iterate
40 do Option = 1 to 6
41 interpret 'call bguiaddcondit(obj.'grp.src',obj.'grp.dst',MX_Active,'Option',MX_DisableButton,'Option',MX_EnableButton,'Option')'
42 end
43 end
44 end
46 a=bguiwindow('RexxBGUI',g,,,,arg(1))
48 if bguiwinopen(a) == 0 then bguierror(12)
50 id = 0
51 do while 1
52 call bguiwinwaitevent(a,'ID')
53 select
54 when (id = id.quit) | (id = id.winclose) then leave
55 otherwise
56 end
57 end
58 rc = 0
60 syntax:
61 if rc ~= 0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
62 call bguiclose()
63 exit 0