当前位置:网站首页>RichView TRVStyle ParaStyles
RichView TRVStyle ParaStyles
2022-06-28 01:23:00 【lyhoo163】
RichView TRVStyle ParaStyles
一、ParaStyles
这是TRVStyle的关键属性之一:段落样式的集合。
ParaSytle定义了段落属性,ParaSytle是 TParaInfos的集合,TParaInfo是TCustomRVParaInfo的子类,继承关系TObject → TPersistent → TCollectionItem → TCustomRVInfo
property ParaStyles : TParaInfos;它是段落样式,用来定义文档中的段落属性。
参见:
TParaInfos (collection of paragraph styles);
TParaInfo (item in collection of paragraph styles).
二、ITEM
在TRVStyle中,ParaStyles以ParaStyles[0]形式存在。如:ParaStyles[0],就是集合中的第一个文本样式。ParaStyles[N] 其中N的值 0..n-1。
三、属性
Alignment // 段落进行对齐,Type TRVAlignment;
LastLineAlignment // 下一行段落进行对齐,Type TRVLastLineAlignment;
FirstIndent // 段落第一行的缩进,用LeftIndent进行总结;
LeftIndent // 左边缘缩进; 使用TRVStyle的单位;
RightIndent // 右边缘的缩进;
SpaceBefore // 段落上方间隔;
SpaceAfter // 段落下方的空格;
Border // 段落周围的边框; TRvBordes
Background // 段落背景;
Tabs // 制表位的集;
LineSpacing // 行间距;
BiDiMode // 默认文本方向;
Options // 保护,包装
OutlineLevel // 允许定义标题。
四、相关属性
1、LineSpacingType
TRvLineSpacingType(rvlsPercent,rvlsSpaceBetween,rvlsLineHeightAtLeast,rvlsLineHeightExact)
2、TRVAlignment
type
TRVAlignment = (rvaLeft, rvaRight, rvaCenter, rvaJustify, rvaDistribute);
rvaLeft 段落向左对齐。
rvaRight 段落向右对齐。
rvaCenter 段落居中。
rvaJustify 段落的所有行(除了最后一行)通过在字与字之间增加空格(即增加空格字符的宽度)来左右对齐。
最后一行根据LastLineAlignment属性进行对齐。
rvaDistribute 段落的所有行(除了最后一行)通过在所有字符之间添加空格左右对齐。
最后一行根据LastLineAlignment属性进行对齐。
3、TRVLastLineAlignment
type
TRVLastLineAlignment =(rvllaDefault, rvllaLeft, rvllaRight, rvllaCenter, rvllaJustify);
rvllaDefault 如果段落从左到右对齐,则行向左对齐,否则行向右对齐。
rvllaLeft 这条线向左对齐。
rvllaRight 这条线向右对齐。
rvllaCenter 这条线居中。
rvllaJustify 该行根据“对齐”属性进行对齐。
4、Bordes
type TBorderStyle = bsNone..bsSingle;
bsNone 无边界r
bsSingle 3D或主题themed
相关设置:
Border.Color // 颜色
Border.Width // 宽
Border.InternalWidth // 内部宽度
Border.Style // 框内类型
Border.VisibleBorders.Left // 是否显示左框
Border.VisibleBorders.Top
Border.VisibleBorders.Right
Border.VisibleBorders.Bottom
Border.BorderOffsets.Left // 段落内容和边框之间的间距。
Border.BorderOffsets.Top
Border.BorderOffsets.Right
Border.BorderOffsets.Bottom
五、ParaStyles默认值
TRVStyle中,ParaStyles默认值(2个):
Paragraph Style // 段落样式
Centered // 中心的
六、建立自己的ParaStyles
RVStyle1.ParaStyles.Clear;
with RVStyle1.ParaStyles.Add do begin
StyleName := 'Paragraph 1';
Alignment := rvaLeft; // 段落进行对齐( left, right, center, justify or distribute)
LastLineAlignment:=rvaLeft; // 下一行段落进行对齐(左对齐,右对齐,居中对齐,对齐或分配);
FirstIndent:=0; // 段落第一行的缩进
LeftIndent:=0; // 左边缘缩进;
RightIndent:=0; // 右边缘的缩进;
SpaceBefore:=5; // 段落上方间隔;
SpaceAfter:=5; // 段落下方的空格;
Border:=:bsNone; // 无边框
end;
with RVStyle1.ParaStyles.Add do begin
StyleName := 'Paragraph 2';
Alignment := rvaCenter; // 段落进行对齐( left, right, center, justify or distribute)
LastLineAlignment:=rvaLeft; // 下一行段落进行对齐(左对齐,右对齐,居中对齐,对齐或分配);
FirstIndent:=0; // 段落第一行的缩进
LeftIndent:=0; // 左边缘缩进;
RightIndent:=0; // 右边缘的缩进;
SpaceBefore:=5; // 段落上方间隔;
SpaceAfter:=5; // 段落下方的空格;
Border:=:bsSingle; // 有边框
Border.VisibleBorders.Top:=True; // 边框是否显示
Border.VisibleBorders.Left:=False;
Border.VisibleBorders.Right:=False;
Border.VisibleBorders.Bottom:=True;
end;
边栏推荐
- STM32的C语言与汇编语言混合编程
- 字节跳动面试官:一张图片占据的内存大小是如何计算
- 微信小程序中生成二维码
- 【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真
- Gateway microservice routing failed to load microservice static resources
- be fond of the new and tired of the old? Why do it companies prefer to spend 20K on recruiting rather than raise salaries to retain old employees
- Mixed programming of C language and assembly language in stm32
- [today in history] June 24: Netease was established; The first consumer electronics exhibition was held; The first webcast in the world
- Online text batch inversion by line tool
- Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times
猜你喜欢

isEmpty 和 isBlank 的用法區別

Win11无法使用动态壁纸怎么办?Win11用不了动态壁纸的解决方法

第一次使用gcc和makefile编写c程序

> Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复

Le routage des microservices de la passerelle a échoué au chargement des ressources statiques des microservices

Simple file transfer protocol TFTP
![[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online](/img/d5/4b3e622ab77bc546ca5d285ef67d8a.jpg)
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online

Online text batch inversion by line tool
![[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

Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦
随机推荐
math_ (function & sequence) meaning of limit & misunderstanding and symbol sorting / neighborhood & de centring neighborhood & neighborhood radius
Interview: how do lists duplicate objects according to their attributes?
分布式事务解决方案Seata-Golang浅析
"Everyday Mathematics" serial 53: February 21
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network
在线JSON转PlainText工具
Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
测试要掌握的技术有哪些?软件测试必懂的数据库设计大全篇
[today in history] June 25: the father of notebook was born; Windows 98 release; First commercial use of generic product code
Mysql database operation - stored procedure, view, transaction, index, database backup
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
Arduino Esp8266 Web LED控制
PSM总结
Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch
SQL reported an unusual error, which confused the new interns
[today in history] May 31: the father of Amiga was born; The co developer of basic language was born; BlackBerry BBM shutdown
[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
How does win11 close recently opened projects? Win11 method to close recently opened projects
StaticLayout的使用详解
简单ELK配置实现生产级别的日志采集和查询实践