如果添加 ,Flex htmlText 会从底部截断多行。
由于某种原因,如果您将图像添加到 htmlText,如下所示:
myText.htmlText = "<img src='"+dataProvider.bodyImage.getUrl('original')+"' align='left' \/>" + dataProvider.bodyText;
图像将成功添加到 htmlText,但似乎测量的尺寸完全错误。有时,实际文本 (dataProvider.bodyText) 的一部分会“隐藏”在图像下方。其他时候,底部会有 1 到 4 条线被切断。但是,如果您选择文本并向下拖动鼠标,您可以看到底线。看起来文本都在那里,但 mx:Text 组件不包括 textHeight 中的图像,因此它不会将组件大小调整为正确的大小。
有什么想法吗?
当前使用:Flex 3(不幸的是,无法升级到4)。
非常感谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关键是您必须在 htmlText 中指定图像的宽度/高度,以便正确计算(或接近它)。
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).