The layer needs to be inserted with addChild method before that content size
works. I ran into the same problem when I was getting started. (It would be
nice if DynAPI checked for this and alert()'d the error.)
Also, I seem to recall some issues in reliably getting the width. In the
end I ended up using a single cell table (I think that was to get word wrap
working). The label widget does this as does my pulldown menu widget.
Ken
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Matt Fair
> Sent: Tuesday, March 27, 2001 11:00 PM
> To: [EMAIL PROTECTED]
> Subject: [Dynapi-Help] DynLayer ContentWidth
>
>
> When is the content width set on a dynlayer?
> When I create a dynlayer and have something like:
> html="<pre style=\""
> html+="color:"+this.getColor()+";"
> html+=" font-size:"+this.getSize()+"px;"
> html+=" font-family:"+this.getFace()
> if(this.isItalic) html+= "; font-style:italic"
> if(this.isBold) html+= "; font-weight:bold"
> if(this.isUnderline) html+= "; text-decoration:underline"
> html += "\">"+this.getText()+"</pre>";
> this.setHTML(html);
>
> The content width is still 0 even after I set the HTML.
> This number doesn't change until I invoke a onmousedown event, then it
> shows that it has a content width.
> Is there anything that I could call to check the width?
> Thanks,
> Matt
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help