That's a problem with NS..
The only solution I've found is to but the contents of a layer
into a table sized for that layer..


function PackHTML(obj,html,align){ //obj is the layer being written to..
    obj.setHTML('<table width=' + obj.getWidth() + ' height=' +
obj.getHeight + '><tr><td align=' + align + '>' + html +
'</td></tr></table>';
}

----- Original Message -----
From: "GORTSILAS ANDREAS" <[EMAIL PROTECTED]>
To: "Dynapi-Help Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, March 06, 2001 9:23 AM
Subject: [Dynapi-Help] NS and addChild(DynLayer) before specify width...


> In the following code, in NS, the myLayer displays correctly but myLayer2
> dos NOT! It shows every word in a separate line:
>
> ...
>     DynAPI.onLoad=function() {
>       DynAPI.document.setBgColor('white');
>       myLayer = new DynLayer()
>       myLayer.setSize(400,100)
>       myLayer.setBgColor('#c0c0c0')
>       myLayer.moveTo(450,100)
>       this.document.addChild(myLayer)
>       myLayer.setHTML('<form id="frmAny" name="frmAny"><center>this is a
2nd
> test</center></form>');
>
>       myLayer2 = new DynLayer()
>       this.document.addChild(myLayer2)
>       myLayer2.setSize(400,100)
>       myLayer2.setBgColor('#c0c0c0')
>       myLayer2.moveTo(450,400)
>       myLayer2.setHTML('<form id="frmAny" name="frmAny"><center>this is a
> 3nd test</center></form>');
>     }
> ....
>
> It looks like that when you "addChild" the layer must have enough width...
>
> In IE there is no problem...
>
> Any ideas?
>
> Andreas
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>


---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to