本文介绍了在Delphi中的标签中显示简单标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我当前正在TLabel中显示一些文本.现在,我想通过以粗体或斜体显示它们来强调文本中的某些单词.在Delphi中推荐这样做的方法是什么?是否有可以显示简单HTML或标记的类似TLabel的组件?我在想像这样的代码:
I am currently displaying some text in a TLabel. I would now like to emphasise certain words within the text by displaying them in bold or perhaps italic. What is the recommended way to do this in Delphi? Is there a TLabel-like component that can display simple HTML or markup?I am imagining some code like this:
label.text:='This information is <b>important</b>';
我正在使用Delphi 2010
I am using Delphi 2010
推荐答案
JVCL中的JvHTLabel可以很好地解决问题.从 http://jvcl.delphi-jedi.org/
JvHTLabel in the JVCL will do the trick very nicely. Download the whole library from http://jvcl.delphi-jedi.org/
这篇关于在Delphi中的标签中显示简单标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!