chuckgom
07-06-2005, 05:42 AM
Hi!
I want to make 10 buttons with a for loop.
However the "simplelayout" doesn't seem to work, so I can only see 1 button.
Could someone explain what to change in the following code to make it work?
thanks.
<canvas debug="true">
<class name="a1">
<button/>
</class>
<view oninit="create_items()">
<simplelayout axis="x"/>
<method name="create_items">
<![CDATA[
for(var tt=0;tt < 10;tt++)
{
debug.write('hello');
new a1();
}
]]>
</method>
</view>
</canvas>
I want to make 10 buttons with a for loop.
However the "simplelayout" doesn't seem to work, so I can only see 1 button.
Could someone explain what to change in the following code to make it work?
thanks.
<canvas debug="true">
<class name="a1">
<button/>
</class>
<view oninit="create_items()">
<simplelayout axis="x"/>
<method name="create_items">
<![CDATA[
for(var tt=0;tt < 10;tt++)
{
debug.write('hello');
new a1();
}
]]>
</method>
</view>
</canvas>