当前位置:网站首页>RichView TRVStyle TextStyles
RichView TRVStyle TextStyles
2022-06-28 01:23:00 【lyhoo163】
RichView TRVStyle TextStyles
一、TextStyles
这是TRVStyle的一个关键属性:文本属性(样式)的集合。
TextStyle定义了字体以及其他文本特性。
proerty TextStyles : TFontInfos;
TextSytle是 TfontInfo的集合,TfontInfo是TCustomRVFontInfo的子类,继承关系TObject → TPersistent → TCollectionItem → TCustomRVInfo → TCustomRVFontInfo
二、ITEM
在TRVStyle中,TextStyles以TextStyles[n]形式存在。如:TextStyles[0],就是集合中的第一个文本样式。TextStyles[n]的N值0..n-1。
默认换页后颜色带入下一页,在HTML文件(D3+)中包含这种风格的字符集保存语言信息;
在某些情况下,该样式被用作默认样式,所以建议将其用作普通文本的样式;请不要将rvprDoNotAutoSwitch设置为保护模式;
这种风格可以用在超文本上,但不推荐。
三、属性
StyleName // 样式名称
FontName // 字体名称;
Size // 字体大小
DoubleSize // 双倍字体大小;
Color // 文本颜色;
Style; // 文本样式(粗体,斜体,下划线,删除线)(bold, italic, underline, strikeout);
Charset // 字体字符集(用于非unicode文本样式)。
BackColor // 文本背景颜色;
UnderlineColor // 下划线颜色;
UnderlineType // 下划线样式(normal、double、虚线等);
四、相关属性
1、Style
type TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);
type TFontStyles = set of TFontStyle;
2、UnderlineType
type
TRVUnderlineType = (rvutNormal, rvutThick, rvutDouble,rvutDotted, rvutThickDotted,
rvutDashed, rvutThickDashed,
rvutLongDashed, rvutThickLongDashed,
rvutDashDotted, rvutThickDashDotted,
rvutDashDotDotted, rvutThickDashDotDotted);
end;
3、Charset
为样式的文本指定字符集。
property Charset: TRVFontCharset;
由于TRichView中的所有文本都以Unicode格式存储,因此在绘制文本时不使用该字符集(但在一些执行ANSIUnicode转换的方法中仍然使用该字符集,以确定该风格文本的代码页(语言))。然而,强烈建议在使用符号字体(如“symbol”,“Wingdings”,“Webdings”)时指定SYMBOL_CHATSET。
注意:该属性在FireMonkey版本中存在,但不用于绘制文本。
默认值: DEFAULT_CHARSET
五、TextStyles默认值
TRVStyle中,TextStyles默认值(6个):
Normal text // 正常的文本
Heading // 标题
Subheading // 副标题
Keywords // 关键字
Jump 1 // 超文本1
Jump 2 // 超文本2
六、建立自己的TextStyles
RVStyle1.TextStyles.Clear;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Normal Text';
FontName:='宋体'; // 字体名称;
Size:=11; // 字体大小
DoubleSize // 双倍字体大小;
Color:= clBlack; // 文本颜色;
Style:=[]; // 文本样式(粗体,斜体,下划线,删除线)(bold, italic, underline, strikeout);
// Charset:=; // 字体字符集(用于非unicode文本样式)。
// BackColor:=clRed; // 文本背景颜色;
// UnderlineColor:=; // 下划线颜色;
// UnderlineType:=; // 下划线样式(TRVUnderlineType);
end;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Heading 1';
FontName:='黑体'; // 字体名称;
Size:=16; // 字体大小
DoubleSize // 双倍字体大小;
Color:= clBlack; // 文本颜色;
Style:=[fsBold] // 文本样式(粗体,斜体,下划线,删除线)(bold, italic, underline, strikeout);
end;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Heading 2';
FontName:='宋体'; // 字体名称;
Size:=14; // 字体大小
DoubleSize // 双倍字体大小;
Color:= clBlack; // 文本颜色;
Style:=[]; // 文本样式(粗体,斜体,下划线,删除线)(bold, italic, underline, strikeout);
end;
边栏推荐
- The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
- 分布式事务—基于消息补偿的最终一致性方案(本地消息表、消息队列)
- StaticLayout的使用详解
- 测试要掌握的技术有哪些?软件测试必懂的数据库设计大全篇
- JDBC and MySQL databases
- Feign远程调用fallback回调失败,无效果
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
- 基于STM32的编写
- Initial linear regression
- 目标检测|SSD原理与实现
猜你喜欢

【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真

STM32的C语言与汇编语言混合编程

isEmpty 和 isBlank 的用法区别
![[today in history] May 31: the father of Amiga was born; The co developer of basic language was born; BlackBerry BBM shutdown](/img/6e/f0e71bb941d5940dbf6d51b812b52e.png)
[today in history] May 31: the father of Amiga was born; The co developer of basic language was born; BlackBerry BBM shutdown

Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document

迪赛智慧数——柱状图(折柱混合图):2021年毕业季租房价格和房租收入比

JDBC and MySQL databases

math_ (function & sequence) meaning of limit & misunderstanding and symbol sorting / neighborhood & de centring neighborhood & neighborhood radius

初始线性回归

StaticLayout的使用详解
随机推荐
简单ELK配置实现生产级别的日志采集和查询实践
Différences d'utilisation entre IsEmpty et isblank
Opencv -- Hough transform and some problems encountered
[plug in -statistical] statistics the number of code lines and related data
2-5 basic configuration -win2003 add attack surface
Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
StaticLayout的使用详解
为什么大厂压力大,竞争大,还有这么多人热衷于大厂呢?
第三批入围企业公示!年度TOP100智能网联供应商评选
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
JDBC与MySQL数据库
Is it reliable to invest in the inter-bank certificate of deposit fund? Is the inter-bank certificate of deposit fund safe
Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
[today in history] June 8: the father of the world wide web was born; PHP public release; IPhone 4 comes out
isEmpty 和 isBlank 的用法区别
MFC CString to LPVOID
PHP 代码 微信、公众号、企业微信 发送表情符号 [U+1F449]
Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
Desai wisdom number - histogram (column folding mixed graph): ratio of rental price to rental income in the graduation quarter of 2021
毕业季来临,2022届高校毕业生人数首次突破千万大关