当前位置:网站首页>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;
边栏推荐
- [plug in -statistical] statistics the number of code lines and related data
- A low-cost method to increase private domain traffic with simple maintenance
- Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
- Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
- Summary of software testing tools in 2021 - fuzzy testing tools
- 横向滚动的RecycleView一屏显示五个半,低于五个平均分布
- Heartless sword Chinese English bilingual poem 004 Sword
- Win11不能拖拽图片到任务栏软件上快速打开怎么办
- PHP 代码 微信、公众号、企业微信 发送表情符号 [U+1F449]
- 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
猜你喜欢
简单ELK配置实现生产级别的日志采集和查询实践
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born
毕业季来临,2022届高校毕业生人数首次突破千万大关
Usage details of staticlayout
[today in history] June 3: Microsoft launched Bing search engine; Larry Roberts starts ARPANET; The father of Visual Basic was born
Gateway微服务路由使微服务静态资源加载失败
Unity WebGL打包后怎么运行(火狐配置)
You got 8K in the 3-year function test, but were overtaken by the new tester. In fact, you are pretending to work hard
腾讯游戏发布40多款产品与项目 其中12款为新游戏
随机推荐
Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch
Win11 cannot create a new text document? Solution to win11 right click failure to create a new text document
What if win11 cannot use dynamic wallpaper? Solution of win11 without dynamic wallpaper
[today in history] June 20: the father of MP3 was born; Fujitsu was established; Google acquires dropcam
isEmpty 和 isBlank 的用法区别
Shuttle uses custompaint to paint basic shapes
字节跳动面试官:一张图片占据的内存大小是如何计算
[postgraduate] bit by bit
新手炒股开户选哪家证券平台办理是最好最安全的
榜单首发——前装搭载率站上10%大关,数字钥匙方案供应商TOP10
Interview: how do lists duplicate objects according to their attributes?
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online
A low-cost method to increase private domain traffic with simple maintenance
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
You got 8K in the 3-year function test, but were overtaken by the new tester. In fact, you are pretending to work hard
毕业季来临,2022届高校毕业生人数首次突破千万大关
[today in history] June 17: the creator of the term "hypertext" was born; The birth of Novell's chief scientist; Discovery channel on
无心剑汉英双语诗004.《剑》
Moving Tencent to the cloud: half of the evolution history of cloud server CVM
[today in history] June 11: the co inventor of Monte Carlo method was born; Google launched Google Earth; Google acquires waze