Delphi RichEdit操作
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操作的更多相关文章
- Delphi Excel 操作大全
Delphi Excel 操作大全 (一) 使用动态创建的方法首先创建 Excel 对象,使用ComObj:var ExcelApp: Variant;ExcelApp := CreateOleObj ...
- delphi 换行操作 Word
delphi 换行操作 我将我的商用<旅行社管理系统>的 发团通知 部分奉献给您,望对您有所帮助. procedure TFrmMain.N327Click(Sender: TObject ...
- Delphi摄像头操作
/*Title:Delphi摄像头操作 *Author:Insun *Blog:http://yxmhero1989.blog.163.com *From:www.4safer.com */ 为了笔耕 ...
- Delphi内存操作API函数(备查,并一一学习)
Delphi内存操作API函数System.IsMemoryManagerSet;System.Move;System.New;System.ReallocMem;System.ReallocMemo ...
- delphi nethttpclient操作cookie
delphi nethttpclient操作cookie unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysU ...
- DELPHI 数据库操作
DELPHI 把数据库中的数据转换成XML格式 function ReplaceString(AString: string): string; begin Result := StringRepla ...
- Delphi文件操作函数
文件是同一种类型元素的有序集合,是内存与外设之间传输数据的渠道.文件的本质是一个数据流,所有的文件实际上是一串二进制序列.文件管理包括:1.文件操作.2.目录操作.3.驱动器操作.三部分. 1.常见文 ...
- Delphi RichEdit的内容保存为图片
uses RichEdit; {将RichEdit1的内容保存为图片,此函数也适合于RxRichEdit,即RichEdit: TRxRichEdit}procedure RichEditToCanv ...
- Delphi 如何操作Excel
摘自:http://wenjieshiyu.blog.163.com/blog/static/10739413201072033115869/ 个人收藏:Delphi 控制Excel(一) 使用动态 ...
随机推荐
- Jedis 操作
http://www.cnblogs.com/liuling/p/2014-4-19-04.html
- hdu 4701 Game 博弈论
思路: ▶ 设 win(i,x,y) 表示当前可以买的物品是 i,先手有 x 元,后 手有 y 元时,先手是否必胜 ▶ win(i,x,y) ⇐⇒∃j((j > i)∧(x ≥ si−sj)∧¬ ...
- MySQL 当记录不存在时插入(insert if not exists)
在 MySQL 中,插入(insert)一条记录很简单,但是一些特殊应用,在插入记录前,需要检查这条记录是否已经存在,只有当记录不存在时才执行插入操作,本文介绍的就是这个问题的解决方案.问题:我创建了 ...
- Floodlight 防火墙是如何起作用的
前言 用mininet + floodlight搭建好环境之后,运行flooglight,然后在mininet中建立网络拓扑,建好之后,pingall,所有host之间可以ping通. 然后向控制器f ...
- A. Counting Kangaroos is Fun(贪心)
#include<stdio.h> #include<algorithm> using namespace std; ]; int main() { int i,n,high; ...
- linux进程的地址空间,核心栈,用户栈,内核线程
linux进程的地址空间,核心栈,用户栈,内核线程 地址空间: 32位linux系统上,进程的地址空间为4G,包括1G的内核地址空间,和3G的用户地址空间. 内核栈: 进程控制块task_struct ...
- Python中itertools模块
itertools模块包含创建有效迭代器的函数,可以用各种方式对数据进行循环操作,此模块中的所有函数返回的迭代器都可以与for循环语句以及其他包含迭代器(如生成器和生成器表达式)的函数联合使用. ch ...
- NPOI操作EXCEL----------NPOI基础01
来源地址:http://www.cnblogs.com/csqb-511612371/p/4878059.html 先来介绍一下NPOI基本的东西: 1.下载地址:http://npoi.codepl ...
- "hadoop namenode -format"命令的作用和影响的文件
在hadoop部署好了之后是不能马上应用的,而是对配置的文件系统进行格式化.这里的文件系统,在物理上还未存在,或者用网络磁盘来描述更加合适:还有格式化,并不是传统意义上的磁盘清理,而是一些清除与准备工 ...
- VS2015中快捷注释代码块
注释ctrl+k ctrl+c 反注释ctrl+k ctrl+u 需要注意的是第二个ctrl不能省略的