当前位置:网站首页>Richview RichEdit srichviewedit PageSize page setup and synchronization
Richview RichEdit srichviewedit PageSize page setup and synchronization
2022-07-01 20:02:00 【lyhoo163】
RichView RichEdit SRichViewEdit PageSize Page setup and synchronization
Use RichView, establish Doc When you file , By setting TRVDocParameters After setting the page , Generated Doc File or Rtf When you file , The file is saved Page Set up , But the file created , Import required DBSRichViewEdit After the save , Unable to import Page Set up the data , At the same time through DBSRichViewEdit, The display cannot be synchronized Page Set up .
Usually we document Page Set up , adopt TRVDocParameters Set up :
Refer to the above parameters , Set up :
procedure SetDocParameters(DP: TRVDocParameters;sPage:string);
begin
if sPage='A4' then
begin
DP.PageWidth := 210; // It's in millimeters
DP.PageHeight := 297;
DP.LeftMargin := 40;
DP.RightMargin := 25;
DP.TopMargin := 30;
DP.BottomMargin := 30;
DP.HeaderY := 10;
DP.FooterY := 10;
end;
if sPage='A5' then
begin
DP.PageWidth := 148;
DP.PageHeight := 210;
DP.LeftMargin := 30;
DP.RightMargin := 20;
DP.TopMargin := 20;
DP.BottomMargin := 20;
DP.HeaderY := 10;
DP.FooterY := 10;
end;
end;
such , We can pass the code , Sets the of the specified page DOC Document. .
for example : The process procedure Generate(sPage:string); Is the process of creating text , The specific code is omitted .
When executed Generate(‘A4') and Generate(‘A5') when , because SRichViewEdit What is the default A4, The screen shows A4 The page of .
Upper figure A4 Interface , The figure below A5 Interface .
After research TSRichViewEdit class , Modify or set up Page Page data , Only through PageProperty Property creation or modification .
stay procedure Generate(sPage:string);, In the code , When importing a document through a stream , Add code :
if sPage='A4' then
begin
RV.PageProperty.PageWidth := 21; // The unit is centimeter
RV.PageProperty.PageHeight := 29.7;
RV.PageProperty.LeftMargin := 4;
RV.PageProperty.RightMargin := 2.5;
RV.PageProperty.TopMargin := 3;
RV.PageProperty.BottomMargin := 3;
RV.PageProperty.HeaderY := 1;
RV.PageProperty.FooterY := 1;
end;
if sPage='A5' then
begin
RV.PageProperty.PageWidth := 14.8;
RV.PageProperty.PageHeight := 21;
RV.PageProperty.LeftMargin := 3;
RV.PageProperty.RightMargin := 2;
RV.PageProperty.TopMargin := 2;
RV.PageProperty.BottomMargin := 2;
RV.PageProperty.HeaderY := 1;
RV.PageProperty.FooterY := 1;
end;
Realization RichEdit SRichViewEdit PageSize Synchronous display .
边栏推荐
- Optimization of the problem that the request flow fails to terminate during page switching of easycvr cluster video Plaza
- C # joint halcon Application - Dahua Camera Collection class
- Simple but modern server dashboard dashdot
- 【C语言】详解 memset() 函数用法
- Wechat applet realizes keyword highlighting
- What if the win11 shortcut key switching input method doesn't respond? Shortcut key switching input method does not respond
- Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
- Anaconda安装虚拟环境到指定路径
- 全国职业院校技能大赛网络安全“splunk“详细配置
- 较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
猜你喜欢
随机推荐
C#联合halcon应用——大华相机采集类
Simple but modern server dashboard dashdot
【无标题】
Detailed configuration of network security "Splunk" in national vocational college skills competition
Use of common built-in classes of JS
Install redis under Linux and configure the environment
Difference between redo and undo
Interview questions shared in today's group
windows环境 redis安装和启动(后台启动)
Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.
想得到股票开户的优惠链接,如何得知?在线开户是安全么?
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
【C语言】详解 memset() 函数用法
A quietly rising domestic software, low-key and powerful!
开发那些事儿:EasyCVR平台添加播放地址鉴权功能
STC 32-bit 8051 single chip microcomputer development example tutorial II i/o working mode and its configuration
Technology T3 domestic platform! Successfully equipped with "Yihui domestic real-time system sylixos"
Problems encountered in installing MySQL in docker Ubuntu container
Win11如何取消任务栏隐藏?Win11取消任务栏隐藏的方法
关于一个神奇函数的用法