当前位置:网站首页>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;
边栏推荐
- Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
- PSM总结
- [plug in -statistical] statistics the number of code lines and related data
- Summary of software testing tools in 2021 - fuzzy testing tools
- Mysql database operation - stored procedure, view, transaction, index, database backup
- [today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp
- Mysql database foundation: DML data operation language
- ADB double click the power key command
- "Everyday Mathematics" serial 53: February 21
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
猜你喜欢

树莓派-环境设置和交叉编译

JDBC and MySQL databases
![[postgraduate] bit by bit](/img/76/b804ff215b8f52f1fe603a9a34a352.jpg)
[postgraduate] bit by bit

榜单首发——前装搭载率站上10%大关,数字钥匙方案供应商TOP10

TensorRT 模型推理优化实现

Win11 ne peut pas faire glisser l'image sur le logiciel de la barre des tâches
![[today in history] June 11: the co inventor of Monte Carlo method was born; Google launched Google Earth; Google acquires waze](/img/eb/147d4aac20639d50b204dcf424c9e2.png)
[today in history] June 11: the co inventor of Monte Carlo method was born; Google launched Google Earth; Google acquires waze
![[today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born](/img/af/1faf1df4262940e73104ed2880f08d.png)
[today in history] June 5: Lovelace and Babbage met; The pioneer of public key cryptography was born; Functional language design pioneer born

PSM summary

微信小程序中生成二维码
随机推荐
喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
元宇宙标准论坛成立
[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp
The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
"Everyday Mathematics" serial 53: February 21
如何开启多语言文本建议?Win11打开多语言文本建议的方法
math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径
面试:Bitmap像素内存分配在堆内存还是在native中
字节跳动面试官:一张图片占据的内存大小是如何计算
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
新手炒股开户选哪家证券平台办理是最好最安全的
isEmpty 和 isBlank 的用法区别
MFC CString to LPVOID
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
简单ELK配置实现生产级别的日志采集和查询实践
Built in functions for MySQL database operations
2021年软件测试工具总结——模糊测试工具
[cloud native] - docker installation and deployment of distributed database oceanbase
What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch