当前位置:网站首页>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;
边栏推荐
- [today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
- QEMU monitor usage
- How to judge that the thread pool has completed all tasks?
- Le routage des microservices de la passerelle a échoué au chargement des ressources statiques des microservices
- [postgraduate] bit by bit
- MFC common current path
- Single page application (SPA) hash route and historical API route
- 【二維碼圖像矯正增强】基於MATLAB的二維碼圖像矯正增强處理仿真
- 字节跳动面试官:一张图片占据的内存大小是如何计算
- > Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复
猜你喜欢

2-5基础配置-Win2003增加攻击面
![[fuzzy neural network] simulation of fuzzy neural network based on MATLAB](/img/2f/ffe3baf37808b78b2c299aef5a717e.jpg)
[fuzzy neural network] simulation of fuzzy neural network based on MATLAB

Usage differences between isempty and isblank

Why are so many people keen on big factories because of the great pressure and competition?

Get 5 offers after being notified of layoffs

Gateway微服务路由使微服务静态资源加载失败

What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper

2021年软件测试工具总结——模糊测试工具

Interpretation of bilstm-crf in NER forward_ algorithm

> Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复
随机推荐
MFC常用 当前路径
基于STM32的编写
音视频技术开发周刊 | 251
[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word "software engineering" was born
Usage details of staticlayout
树莓派-环境设置和交叉编译
分布式事务—基于消息补偿的最终一致性方案(本地消息表、消息队列)
第三批入围企业公示!年度TOP100智能网联供应商评选
Is it reliable to invest in the inter-bank certificate of deposit fund? Is the inter-bank certificate of deposit fund safe
> Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复
2-5 basic configuration -win2003 add attack surface
迪赛智慧数——柱状图(折柱混合图):2021年毕业季租房价格和房租收入比
Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
Shuttle uses custompaint to paint basic shapes
Moving Tencent to the cloud: half of the evolution history of cloud server CVM
【Kotlin】在Android官方文档中对其语法的基本介绍和理解
[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born
A low-cost method to increase private domain traffic with simple maintenance
What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
在线文本按行批量反转工具