当前位置:网站首页>RichView TRVStyle TextStyles
RichView TRVStyle TextStyles
2022-06-28 03:03:00 【lyhoo163】
RichView TRVStyle TextStyles
One 、TextStyles
This is a TRVStyle A key attribute of : Text attribute ( style ) Set .
TextStyle Defines fonts and other text properties .
proerty TextStyles : TFontInfos;
TextSytle yes TfontInfo Set ,TfontInfo yes TCustomRVFontInfo Subclasses of , Inheritance relationships TObject → TPersistent → TCollectionItem → TCustomRVInfo → TCustomRVFontInfo
Two 、ITEM
stay TRVStyle in ,TextStyles With TextStyles[n] The form . Such as :TextStyles[0], Is the first text style in the collection .TextStyles[n] Of N value 0..n-1.
The default color will be carried to the next page after page change , stay HTML file (D3+) Contains this style of character set to store language information ;
In some cases , This style is used as the default style , Therefore, it is recommended to use it as a style for normal text ; Please don't put rvprDoNotAutoSwitch Set to protected mode ;
This style can be used for hypertext , But it is not recommended. .
3、 ... and 、 attribute
StyleName // Style name
FontName // Font name ;
Size // font size
DoubleSize // Double font size ;
Color // text color ;
Style; // Text style ( bold , Italics , Underline , Delete line )(bold, italic, underline, strikeout);
Charset // Font character set ( Used for the unicode Text style ).
BackColor // Text background color ;
UnderlineColor // Underline color ;
UnderlineType // Underline style (normal、double、 Dotted line, etc );
Four 、 Related properties
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
Specify the character set for the styled text .
property Charset: TRVFontCharset;
because TRichView All text in the is in the form of Unicode Format store , Therefore, this character set is not used when drawing text ( But in some cases ANSIUnicode The character set is still used in the conversion method , To determine the code page for this style of text ( Language )). However , It is strongly recommended to use symbol Fonts ( Such as “symbol”,“Wingdings”,“Webdings”) When you specify SYMBOL_CHATSET.
Be careful : This attribute in FireMonkey There is , It is not used to draw text .
The default value is : DEFAULT_CHARSET
5、 ... and 、TextStyles The default value is
TRVStyle in ,TextStyles The default value is (6 individual ):
Normal text // Normal text
Heading // title
Subheading // Subtitle
Keywords // keyword
Jump 1 // Hypertext 1
Jump 2 // Hypertext 2
6、 ... and 、 Build your own TextStyles
RVStyle1.TextStyles.Clear;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Normal Text';
FontName:=' Song style '; // Font name ;
Size:=11; // font size
DoubleSize // Double font size ;
Color:= clBlack; // text color ;
Style:=[]; // Text style ( bold , Italics , Underline , Delete line )(bold, italic, underline, strikeout);
// Charset:=; // Font character set ( Used for the unicode Text style ).
// BackColor:=clRed; // Text background color ;
// UnderlineColor:=; // Underline color ;
// UnderlineType:=; // Underline style (TRVUnderlineType);
end;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Heading 1';
FontName:=' In black '; // Font name ;
Size:=16; // font size
DoubleSize // Double font size ;
Color:= clBlack; // text color ;
Style:=[fsBold] // Text style ( bold , Italics , Underline , Delete line )(bold, italic, underline, strikeout);
end;
with RVStyle1.TextStyles.Add do begin
StyleName := 'Heading 2';
FontName:=' Song style '; // Font name ;
Size:=14; // font size
DoubleSize // Double font size ;
Color:= clBlack; // text color ;
Style:=[]; // Text style ( bold , Italics , Underline , Delete line )(bold, italic, underline, strikeout);
end;
边栏推荐
- Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
- Différences d'utilisation entre IsEmpty et isblank
- Le routage des microservices de la passerelle a échoué au chargement des ressources statiques des microservices
- [today in history] June 20: the father of MP3 was born; Fujitsu was established; Google acquires dropcam
- math_ (function & sequence) meaning of limit & misunderstanding and symbol sorting / neighborhood & de centring neighborhood & neighborhood radius
- Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
- StaticLayout的使用详解
- [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
- [today in history] June 3: Microsoft launched Bing search engine; Larry Roberts starts ARPANET; The father of Visual Basic was born
- [postgraduate] bit by bit
猜你喜欢
![[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born](/img/ba/aa5db22e1391886a4e263d10e5f9f7.png)
[today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born

Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
![[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
![Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]](/img/5f/24fd110a73734ba1638f0aad63c787.png)
Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]

Différences d'utilisation entre IsEmpty et isblank

isEmpty 和 isBlank 的用法區別

拾光者,云南白药!

Simple elk configuration to realize production level log collection and query practice

Flashtext, a data cleaning tool, has directly increased the efficiency by dozens of times

The graduation season is coming, and the number of college graduates in 2022 has exceeded 10 million for the first time
随机推荐
业内首个!可运行在移动设备端的视频画质主观体验MOS分评估模型!
STM32的C语言与汇编语言混合编程
Severe Tire Damage:世界上第一个在互联网上直播的摇滚乐队
如何判断线程池已经执行完所有任务了?
AgilePLM异常解决-Session篇
[fuzzy neural network] simulation of fuzzy neural network based on MATLAB
"Everyday Mathematics" serial 53: February 21
QEMU monitor usage
转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能
You got 8K in the 3-year function test, but were overtaken by the new tester. In fact, you are pretending to work hard
How does win11 close recently opened projects? Win11 method to close recently opened projects
Heartless sword Chinese English bilingual poem 004 Sword
在线文本按行批量反转工具
面试:List 如何根据对象的属性去重?
Single page application (SPA) hash route and historical API route
[block coding] simulation of image block coding based on MATLAB
MFC CString to LPVOID
Mysql database operation - stored procedure, view, transaction, index, database backup
JDBC and MySQL databases
The horizontal scrolling recycleview displays five and a half in one screen, which is lower than the five average distributions