当前位置:网站首页>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;
边栏推荐
- 【Kotlin】在Android官方文档中对其语法的基本介绍和理解
- Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times
- Simple elk configuration to realize production level log collection and query practice
- [today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
- Opencv -- Hough transform and some problems encountered
- 无心剑英汉双语诗004.《静心》
- Win11 ne peut pas faire glisser l'image sur le logiciel de la barre des tâches
- [elevator control system] design of elevator control system based on VHDL language and state machine, using state machine
- Digital intelligence learning Lake Warehouse Integration Practice and exploration
- [block coding] simulation of image block coding based on MATLAB
猜你喜欢
[today in history] June 20: the father of MP3 was born; Fujitsu was established; Google acquires dropcam
抓包整理外篇fiddler————了解工具栏[一]
Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network
The first place on the list - the carrying rate of front-end equipment is up to 10%, and the top 10 suppliers of digital key solutions
Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
TensorRT 模型推理优化实现
[today in history] June 2: Apple launched swift programming language; China Telecom acquires China Unicom C network; OS X Yosemite release
Usage details of staticlayout
随机推荐
字节跳动面试官:一张图片占据的内存大小是如何计算
Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦
The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
视频编解码性能优化与实现
Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch
Single page application (SPA) hash route and historical API route
简单ELK配置实现生产级别的日志采集和查询实践
在线文本按行批量反转工具
喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置
[today in history] June 15: the first mobile phone virus; AI master simahe was born; Chromebook launch
SQL reported an unusual error, which confused the new interns
毕业季来临,2022届高校毕业生人数首次突破千万大关
How to enable multi language text suggestions? Win11 method to open multilingual text suggestions
The first place on the list - the carrying rate of front-end equipment is up to 10%, and the top 10 suppliers of digital key solutions
STM32的C语言与汇编语言混合编程
测试要掌握的技术有哪些?软件测试必懂的数据库设计大全篇
面试:Bitmap像素内存分配在堆内存还是在native中
"Everyday Mathematics" serial 53: February 21
[today in history] June 13: parent-child disputes in packet switched networks; The founder of game theory was born; The embryonic form of interactive television