1.选择设置对齐

RichEdit1.SelectAll;
RichEdit1.Paragraph.Alignment:=taLeftJustify; // switch for other alignments
RichEdit1.SelLength:=0; 2.设置对齐和内容

redt1.Clear;

redt1.Lines.Add('XXXX分析报告' + #13#10);
strMsg := '打印时间:' + FormatDateTime('yyyy年hh月dd日 hh时MM分ss秒', Now);
redt1.Lines.Add(strMsg);
strMsg := '打印时间:' + FormatDateTime('yyyy年hh月dd日 hh时MM分ss秒', Now);
redt1.Lines.Add(strMsg);
strMsg := '进样时间:' + FormatDateTime('yyyy年hh月dd日 hh时MM分ss秒', Now);
redt1.Lines.Add(strMsg);
strMsg := '质检(E)字第()号';
redt1.Lines.Add(strMsg);
strMsg := '送样单位:' + 'XXX公司' + '仪器型号:' + 'SC-1001-09A';
redt1.Lines.Add(strMsg);
strMsg := '取样日期:' + FormatDateTime('yyyy年hh月dd日 ', Now) + '收样日期:' + FormatDateTime('yyyy年hh月dd日 ', Now);
redt1.Lines.Add(strMsg);
strMsg := '样品批号:' + '' + '样品名称:' + '固液';
redt1.Lines.Add(strMsg);
strMsg := '样品罐号:' + 'A-1-2';
redt1.Lines.Add(strMsg);
strMsg := '仪器文件控制参数:' + '#1111';
redt1.Lines.Add(strMsg);
strMsg := '';
redt1.Lines.Add(strMsg);
strMsg := 'C:\AAAAAAA\111.bmp';
redt1.Lines.Add(strMsg);
redt1.SelStart := 4;
redt1.Paragraph.Alignment := taCenter;

3.改变字体大小

//改变第二行的字体大小为15
RichEdit1.SelStart := Length(RichEdit1.Lines[0]);
RichEdit1.SelLength := Length(RichEdit1.Lines[1]) + 2;
richedit1.SelAttributes.Size := 15;

Delphi RichEdit操作的更多相关文章

  1. Delphi Excel 操作大全

    Delphi Excel 操作大全 (一) 使用动态创建的方法首先创建 Excel 对象,使用ComObj:var ExcelApp: Variant;ExcelApp := CreateOleObj ...

  2. delphi 换行操作 Word

    delphi 换行操作 我将我的商用<旅行社管理系统>的 发团通知 部分奉献给您,望对您有所帮助. procedure TFrmMain.N327Click(Sender: TObject ...

  3. Delphi摄像头操作

    /*Title:Delphi摄像头操作 *Author:Insun *Blog:http://yxmhero1989.blog.163.com *From:www.4safer.com */ 为了笔耕 ...

  4. Delphi内存操作API函数(备查,并一一学习)

    Delphi内存操作API函数System.IsMemoryManagerSet;System.Move;System.New;System.ReallocMem;System.ReallocMemo ...

  5. delphi nethttpclient操作cookie

    delphi nethttpclient操作cookie unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysU ...

  6. DELPHI 数据库操作

    DELPHI 把数据库中的数据转换成XML格式 function ReplaceString(AString: string): string; begin Result := StringRepla ...

  7. Delphi文件操作函数

    文件是同一种类型元素的有序集合,是内存与外设之间传输数据的渠道.文件的本质是一个数据流,所有的文件实际上是一串二进制序列.文件管理包括:1.文件操作.2.目录操作.3.驱动器操作.三部分. 1.常见文 ...

  8. Delphi RichEdit的内容保存为图片

    uses RichEdit; {将RichEdit1的内容保存为图片,此函数也适合于RxRichEdit,即RichEdit: TRxRichEdit}procedure RichEditToCanv ...

  9. Delphi 如何操作Excel

    摘自:http://wenjieshiyu.blog.163.com/blog/static/10739413201072033115869/ 个人收藏:Delphi  控制Excel(一) 使用动态 ...

随机推荐

  1. 实战案例--Grunt构建Web程序

    GruntJS构建Web程序.使用Gruntjs来搭建一个前端项目,然后使用grunt合并,压缩JS文件,熟练了node.js安装和grunt.js安装后,接下来来实战一个案例,案例是根据snandy ...

  2. hdu 4578 Transformation 线段树

    没什么说的裸线段树,注意细节就好了!!! 代码如下: #include<iostream> #include<stdio.h> #include<algorithm> ...

  3. hdu 1333 Smith Numbers

    刚开始没看清题意,要找的数一定要是素数 ;}

  4. ServletRequest中getReader()和getInputStream()只能调用一次的解决办法

    转载:http://blog.sina.com.cn/s/blog_870cd7b90101fg58.html 最近使用spring mvc做项目,数据格式是json,有一个功能是实现记录请求的参数, ...

  5. 360云盘、百度云、微云……为什么不出 OS X(Mac 端)应用呢?(用户少,开发成本高)(百度网盘Mac版2016.10.18横空出世)

    已经说的很好了,现有的云盘所谓的 OS X 版只有云同步功能,不过 115 是个例外,不过 115 的现状……不言自明.接下来说点和本题答案无关的,其实在官方客户端流氓 + 限速的大背景下 OS X ...

  6. iOS 深入理解RunLoop

    RunLoop 是 iOS 和 OSX 开发中非常基础的一个概念,这篇文章将从 CFRunLoop 的源码入手,介绍 RunLoop 的概念以及底层实现原理.之后会介绍一下在 iOS 中,苹果是如何利 ...

  7. HDU5086——Revenge of Segment Tree(BestCoder Round #16)

    Revenge of Segment Tree Problem DescriptionIn computer science, a segment tree is a tree data struct ...

  8. python处理Excel

    Python中一般使用xlrd库来读取Excel文件,使用xlwt库来生成Excel文件,使用xlutils库复制和修改Excel文件.这三个库只支持到Excel2003. python-excel主 ...

  9. INSERT ... ON DUPLICATE KEY UPDATE Syntax

    一 mybatis中返回自动生成的id 当有时我们插入一条数据时,由于id很可能是自动生成的,如果我们想要返回这条刚插入的id怎么办呢.在mysql数据中我们可以在insert下添加一个selectK ...

  10. AndroidApplication Fundamentals(Android应用基础)

    AndroidApplication Fundamentals(Android应用基础) Android应用采用Java编程语言来编写,AndroidSDK工具编译我们的代码,连同任何数据和资源文件一 ...