Skip to main content
Participating Frequently
Mar 19, 2009 2:36 AM UTC
Question

calculate the mimimum width of the IContainterController

If the compositionHeight is specified but the compositionWidth not, I know in this situation IContainterController will assume compositionWidth a certain value.

But is there a way that I can caculate the minimum width of the IContainterController when only the height is specified.
that is, the text in the IContainterController occupies minimum width but won't be in excess of the height.

Thanks
This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

NakoRuruAuthor
Participating Frequently
Mar 20, 2009 1:10 AM UTC
maybe I didn't discribe my situation clearly.

the text displays horizontally, but it should reaches largest height as posible but less than the specified height, under this situation, can I fetch the current width of the text
Translate
Adobe Employee
Mar 19, 2009 10:29 PM UTC
Are you using vertical or horizontal text? In horizontal text (as for Latin languages), if you set the compositionWidth to NaN, you will get very long lines -- the paragraphs won't be wrapping. In vertical text, in the same circumstance, it will wrap to the height that is supplied, and you can find out the minimum width by getting the contentWidth after the text is updated.

I hope this is clear -- talking about width & height in the context of text that may be either vertical or horizontal is challenging.
Translate