Flex RichText 与标签控件

发布于 2024-11-01 21:13:47 字数 214 浏览 6 评论 0原文

我有一个 Flex 项目,在其中广泛使用 Spark RichText 控件,在某些地方我可以用 Label 控件替换 RichText -(富文本是由于从 Flash Catalyst 导入而发生的)。

我的问题是,使用 Label 相对于 RichText 是否有任何空间/性能优势,因为 Label 似乎是一个更轻的选项,我正在构建一个 Web 应用程序,大小很重要。

谢谢。

I have a flex project where I uses the spark RichText control quite extensively, there are places where it is possible for me to replace RichText with the Label control - (The rich text occurred due an import from Flash Catalyst).

My question is, is there any space/performance advantage in using Label over RichText, since Label seems like a much lighter option, I am building a web app, size matters.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无力看清 2024-11-08 21:13:47

除非您的文本需要以下功能之一:

  • 多种格式
  • 多个段落
  • 文本对象模型
  • 标记语言
  • 内联图形

使用简单的标签,它确实比 RichText 更轻。我不知道你最终会节省多少大小和内存,但这样做不会有什么坏处。

Unless you need one of these features for your text :

  • Multiple formats
  • Multiple paragraphs
  • Text object model
  • Markup language
  • Inline graphics

Go with a simple Label, it's indeed lighter than the RichText. I don't know how much size and memory you will save at the end but it won't hurt doing it.

悲歌长辞 2024-11-08 21:13:47

当然,LabelRichText 具有更好的性能和内存使用率。而 Label 是简单标签的最佳选择。

应用程序大小取决于您的项目设置。如果您使用 RSL(这是 Flash Builder 中 Flex 4 项目的默认选项),那么您使用什么组件并不重要。

Of course Label has better performance and memory usage than RichText. And Label is the best option for simple labels.

What about application size it depends on your project's settings. If you're using RSLs (which is default option for Flex 4 projects in Flash Builder) it doesn't matter what component do you using.

凹づ凸ル 2024-11-08 21:13:47

来自 Adob​​e...

RichText 使用文本布局框架 (TLF) 库,该库又构建于 Flash Player 10 中的 Flash 文本引擎 (FTE) 之上。两者结合起来,使用高质量的国际版式提供富文本布局。

Spark 架构提供了三种文本“原语”——Label、RichText 和 RichEditableText。 Label 是最快、最轻量级的,因为它仅使用 FTE,而不是 TLF,但它的功能有限:没有富文本、没有滚动、没有选择和编辑。 RichText 添加了显示具有复杂布局的富文本的功能,但仍然是完全非交互式的。

From Adobe...

RichText uses the Text Layout Framework (TLF) library, which in turn builds on the Flash Text Engine (FTE) in Flash Player 10. In combination, they provide rich text layout using high-quality international typography.

The Spark architecture provides three text "primitives" -- Label, RichText, and RichEditableText. Label is the fastest and most lightweight because it uses only FTE, not TLF, but it is limited in its capabilities: no rich text, no scrolling, no selection, and no editing. RichText adds the ability to display rich text with complex layout, but is still completely non-interactive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文