当前位置:网站首页>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;
边栏推荐
- 字节跳动面试官:一张图片占据的内存大小是如何计算
- 迪赛智慧数——柱状图(折柱混合图):2021年毕业季租房价格和房租收入比
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
- JDBC and MySQL databases
- 横向滚动的RecycleView一屏显示五个半,低于五个平均分布
- You got 8K in the 3-year function test, but were overtaken by the new tester. In fact, you are pretending to work hard
- js清空对象和对象的值:
- Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
- SQL reported an unusual error, which confused the new interns
- Flask Foundation: template inheritance + static file configuration
猜你喜欢
![[today in history] June 15: the first mobile phone virus; AI master simahe was born; Chromebook launch](/img/d4/413c84a75f16a09867cfaa3d7f8736.png)
[today in history] June 15: the first mobile phone virus; AI master simahe was born; Chromebook launch

Arduino esp8266 web LED control
![[cloud native] - docker installation and deployment of distributed database oceanbase](/img/02/57ab785acafd8ff0a49c584dd05188.png)
[cloud native] - docker installation and deployment of distributed database oceanbase
![[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word](/img/0d/9f99eb3dcb73c912987b81fba71890.png)
[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

基于STM32的编写

Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
![[today in history] June 25: the father of notebook was born; Windows 98 release; First commercial use of generic product code](/img/ef/a26127284fe57ac049a4313d89cf97.png)
[today in history] June 25: the father of notebook was born; Windows 98 release; First commercial use of generic product code

CMU提出NLP新范式—重构预训练,高考英语交出134高分
![[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born](/img/4f/67e1598b523058a8fb6f3148136902.png)
[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born
![[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB
随机推荐
分布式事务TCC浅析
Digital intelligence learning Lake Warehouse Integration Practice and exploration
What if win11 can't drag an image to the taskbar software to open it quickly
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
Shardingsphere-proxy-5.0.0 establish MySQL read / write separation connection (6)
喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
拾光者,云南白药!
isEmpty 和 isBlank 的用法區別
[today in history] June 19: iPhone 3GS launched; Pascal was born; Anti terrorist elite begins testing
Simple file transfer protocol TFTP
ByteDance Interviewer: how to calculate the memory size occupied by a picture
【插件-statistic】统计代码行数和相关数据
How fiddle uses agents
How to judge that the thread pool has completed all tasks?
Initial linear regression
树莓派-环境设置和交叉编译
测试要掌握的技术有哪些?软件测试必懂的数据库设计大全篇
【二維碼圖像矯正增强】基於MATLAB的二維碼圖像矯正增强處理仿真
新手炒股开户选哪家证券平台办理是最好最安全的
"Dadao Zhichuang" won a ten million prea+ round of financing and launched a technology consumption robot