sankha
04-13-2007, 12:06 AM
I am trying to programatically add views to a container view. The containing view is managed by a wrappig layout. The problem I am facing is that the added subviews are not being managed by the layout manager of the containing view. All the subviews are being added to the same co-ordinates and are piling up on each other. This is the code I am using .....
if(seqdp.selectChild())
{
do
{
// Do some processing
var attributes = seqdp.getNodeAttributes();
var mydt = attributes['name'];
var myimg = attributes['image'];
var myid = attributes['id'];
// Create subview - The subview needs to be added to the sequenceview
var myitem = new dragelement(sequenceview);
myitem.setAttribute('detailtext',mydt);
myitem.displayimage.setAttribute('src',myimg);
}while(seqdp.selectNext());
The markup for sequenceview is ....
<tabelement name="sequence" text="Sequences" layout="spacing:8" selected="true">
<!-- This is the layout manager for the sequenceview container -->
<wrappinglayout id="sequencelayout" axis="x" xspacing="5" yspacing="5"/>
<!-- This is the container view -->
<view id="sequenceview" width="${this.parent.width}" height="${this.parent.height}">
</view>
Am i missing something here???
if(seqdp.selectChild())
{
do
{
// Do some processing
var attributes = seqdp.getNodeAttributes();
var mydt = attributes['name'];
var myimg = attributes['image'];
var myid = attributes['id'];
// Create subview - The subview needs to be added to the sequenceview
var myitem = new dragelement(sequenceview);
myitem.setAttribute('detailtext',mydt);
myitem.displayimage.setAttribute('src',myimg);
}while(seqdp.selectNext());
The markup for sequenceview is ....
<tabelement name="sequence" text="Sequences" layout="spacing:8" selected="true">
<!-- This is the layout manager for the sequenceview container -->
<wrappinglayout id="sequencelayout" axis="x" xspacing="5" yspacing="5"/>
<!-- This is the container view -->
<view id="sequenceview" width="${this.parent.width}" height="${this.parent.height}">
</view>
Am i missing something here???