Skip to main content
Participating Frequently
March 19, 2009
Question

calculate the mimimum width of the IContainterController

  • March 19, 2009
  • 2 replies
  • 468 views
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 has been closed for replies.

2 replies

NakoRuruAuthor
Participating Frequently
March 20, 2009
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
Adobe Employee
March 19, 2009
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.