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下cssmin的配置参数

    每个目标的具体设置,需要参考该模板的文档minify目标的参数具体含义如下: expand:如果设为true,就表示下面文件名的占位符(即*号)都要扩展成具体的文件名. cwd:需要处理的文件(inp ...

  2. Project Euler 92:Square digit chains 平方数字链

    题目 Square digit chains A number chain is created by continuously adding the square of the digits in ...

  3. 对于linux下system()函数的深度理解(整理)

    原谅: http://blog.sina.com.cn/s/blog_8043547601017qk0.html 这几天调程序(嵌入式linux),发现程序有时就莫名其妙的死掉,每次都定位在程序中不同 ...

  4. spring @bean注解

    1.@bean注解用于注册一个bean到 到ioc容器中.类似于@component注解 2.@configure注解,相当于指明这个类是配置文件 3.@bean还可以指定initMethod,des ...

  5. Android:AlertDialog对话框

    1.简单的ALertDialog: Dialog alertDialog = new AlertDialog.Builder(this) .setTitle("标题") .setM ...

  6. Oracle配置详解

    [Oracle连接字符串][Oracle Net Manager 服务命名配置][PL/SQL 登陆数据库] 连接数据库的几个重要参数: 1. 登陆用户名:user: 2. 登录密码:password ...

  7. OSSEC - Agent端查看命令

    命令:/opt/ossec/bin/agent_control -h注释:/opt/为安装目录 [root@redhat rules]# /opt/ossec/bin/agent_control -h ...

  8. Hibernate 主键策略

    Hibernate主键生成策略 .自动增长identity 适用于MySQL.DB2.MS SQL Server,采用数据库生成的主键,用于为long.short.int类型生成唯一标识 使用SQL ...

  9. 前端自动化工具:Grunt使用教程

    1.下载node.js,然后将node.exe文件所在的目录加入path环境变量 2.安装npm管理工具 2.1.下载npm源码,解压到npm文件夹里,不要把npm放在和node.exe相同的文件夹 ...

  10. 简化PHP开发的10个工具

    本文介绍了可以帮助简化 PHP 开发的11个项目,包括框架,类库,工具,代码. 1. CakePHP Development Framework CakePHP 是一个 PHP 的快速开发框架.它提供 ...