Re: How to dynamically add Radio items, and a page.
Posted: Sat Feb 08, 2025 10:33 pm
Ok, this seems like a RapaGUI bug. It seems to be related to the fact that the objects are to be inserted into a Pageview object. I was able to work around the problem by using another group child within the Pageview page. When doing it like that, the radio widget finally shows but unfortunately using this workaround seems to trigger another bug because now the layout of the sliders is wrong so I guess I need to fix several things here 
Anyway, here's my code, at least it shows the radio widget with this code:
XML:
Hollywood code:
Anyway, here's my code, at least it shows the radio widget with this code:
XML:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window title="Rogue Football Cardgame" id="window" width="400">
<vgroup>
<vspace height="2"/>
<pageview id = "mainpages">
<hgroup title="Volume">
<colgroup columns="2">
<label>Sounds:</label>
<slider min="0" max="100" level="50"/>
<label>Music:</label>
<slider min="0" max="100" level="50"/>
</colgroup>
</hgroup>
<vgroup title="Test" id="test">
<hgroup frametitle="Yo" id="testgroup" frame="true">
<rectangle/>
</hgroup>
</vgroup>
</pageview>
<hgroup>
<button id="button_start">START</button>
</hgroup>
</vgroup>
</window>
</application>
Code: Select all
@VERSION 9,0
@OPTIONS {DPIAware = True}
@REQUIRE "RapaGUI"
@FILE 1, "RapaGuiPart.xml"
moai.CreateApp(ReadString(1))
amigaresolutions = {}
RadioStart$ = [[
<radio id="printer">
<item>HP Deskjet</item>
<item>NEC P6</item>
<item>Okimate 20</item>
</radio>
]]
moai.CreateObject(RadioStart$, "testgroup")
moai.DoMethod("testgroup", "initchange")
moai.DoMethod("testgroup", "append", "printer")
moai.DoMethod("testgroup", "exitchange")
Repeat
WaitEvent
Forever