Pregunta

For some reason, if you add an image to htmlText, like the following:

myText.htmlText = "<img src='"+dataProvider.bodyImage.getUrl('original')+"' align='left' \/>" + dataProvider.bodyText;

The image will be succesfully added to the htmlText, but it seems to measure the sizes completely wrong. At times, the actual text (dataProvider.bodyText) will have part 'hidden' under the image. At other times, there are anywhere from 1 to 4 lines cut off at the bottom. However, if you select the text and drag your mouse down, you can see the bottom lines. It appears the text is all there, but the mx:Text component is not including the image in the textHeight, so it doesnt resize the componenet to the correct size.

Any ideas?

Currently using: Flex 3 (cannot upgrade to 4, unfortunately).

Thanks so much!

¿Fue útil?

Solución

The key is you have to specify the width/height of the image in htmlText in order for it to be calculated correctly (or close to it, anyway).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top