pep
05-19-2004, 07:44 PM
I want to add views dynamically with a js script, so I tried :
<view name="bar">
<simplelayout axis="x"/>
<method name="addSubV">
var foo=new LzView();
foo.construct(this,null);
foo.setAttribute('height',10);
foo.setAttribute('width',10);
foo.setAttribute('bgcolor',0x000000);
this.addSubview(foo);
</method>
</view>
but unfortunately the view is not created as a child of the current view (bar), but is directly attached to the root canvas.
did I missed something?
<view name="bar">
<simplelayout axis="x"/>
<method name="addSubV">
var foo=new LzView();
foo.construct(this,null);
foo.setAttribute('height',10);
foo.setAttribute('width',10);
foo.setAttribute('bgcolor',0x000000);
this.addSubview(foo);
</method>
</view>
but unfortunately the view is not created as a child of the current view (bar), but is directly attached to the root canvas.
did I missed something?