Try:
mylayer.setWidth(mylayer.getContentWidth());
mylayer.setHeight(mylayer.getContentHeight());
--
// Robert Rainwater
--
DynAPI Homepage: http://dynapi.sourceforge.net/
On Thursday, March 01, 2001 6:11:48 PM Matt Fair wrote:
> Hi,
> Is there a way to find the width in pixels you text is or what the width
> of a dynlayer when it initialized as null?
> I want to have a DynLayer hold a text string, and have it be the width
> and height of the text string so I can highlight the text string when
> clicked on and center the whole string on the page.
>
> When I create the layer with a null width, the layer fits perfectly
> around the text, regardless of font or text size.
> But the problem is if I were to change the HTML on that layer with
> setHTML the layer stays the same, even if I try to set Size with a null
> width.
>
> Any help would be greatly appreciated.
> 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