当前位置:网站首页>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;
边栏推荐
- Feign远程调用fallback回调失败,无效果
- [today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
- PHP 代码 微信、公众号、企业微信 发送表情符号 [U+1F449]
- 拾光者,云南白药!
- Intel Ruixuan A380 graphics card will be launched in China
- [today in history] June 19: iPhone 3GS launched; Pascal was born; Anti terrorist elite begins testing
- [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
- How does win11 add printers and scanners? Win11 add printer and scanner settings
- > Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复
- What if win11 can't drag an image to the taskbar software to open it quickly
猜你喜欢
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
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
Le routage des microservices de la passerelle a échoué au chargement des ressources statiques des microservices
被通知裁员后拿到5个offer
3年功能测试拿8K,被刚来的测试员反超,其实你在假装努力
StaticLayout的使用详解
[today in history] June 17: the creator of the term "hypertext" was born; The birth of Novell's chief scientist; Discovery channel on
Simple file transfer protocol TFTP
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network
[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
随机推荐
Shardingsphere-proxy-5.0.0 establish MySQL read / write separation connection (6)
Single page application (SPA) hash route and historical API route
新手炒股开户选哪家证券平台办理是最好最安全的
英特尔锐炫A380显卡即将在中国面市
[inverted pendulum control] Simulink simulation of inverted pendulum control based on UKF unscented Kalman filter
How to run unity webgl after packaging (Firefox configuration)
[cloud native] - docker installation and deployment of distributed database oceanbase
腾讯游戏发布40多款产品与项目 其中12款为新游戏
Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
Summary of software testing tools in 2021 - fuzzy testing tools
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
第一次使用gcc和makefile编写c程序
【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
Livedata interview question bank and answers -- 7 consecutive questions for livedata interview~
第三批入围企业公示!年度TOP100智能网联供应商评选
PSM summary
喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
Is it reliable to invest in the inter-bank certificate of deposit fund? Is the inter-bank certificate of deposit fund safe
STM32的C语言与汇编语言混合编程