首页 »标签 » delphirichedit » 列表
首先在form上放置一个richedit。在窗体的构造函数中添加以下代码:__fastcall tmainform::tmainform(tcomponent* owner): tform(owner){unsigned mask = sendmessage(richedit1->handle, em_geteventmask, 0, 0);sendmessage(richedit1->handle, em_seteventmask, 0, mask | enm_link);sendmessage(richedit1->handle, e [阅读全文] [PDF]
一、如何得知当前行号 用RichEdit(或者memo)控件制作文本编辑器时,通过访问lines??count属性可以得到总行数,但是若想知道光标当前所在行的行号就麻烦了,因为delphi没有提供这个属性。要实现这个编辑器必备功能,就须调用em_ LineFromChar。请试试下面的程序。 先在窗口中布置一个RichEdit或者memo(命名为editor),以及一个button。在button的onclick事件中写入下列代码。 var CurrentLine:Integer; begin CurrentLine:= [阅读全文] [PDF]
// 指定输入游标的位置procedure SetCaret(RTF: TRichEdit; var Row, Col: word);vari, iStopLine, iSelStart: integer;beginif (RTF = nil) then Exit;if Row = 0 then Row := 1;if Col = 0 then Col := 1;// 到第 Row 列, Col 行共几个字元iStopLine := Row - 1;iSelStart := 0;for i := 0 to RTF.Lines.Count - 1 dobeg [阅读全文] [PDF]
// You can move the caret in a TRichEdit component by using this code :procedure RichEdit_MoveTo(RichEdit: TRichEdit; LineNumber, CharNumber: Word);begin RichEdit.SelStart := RichEdit.Perform(EM_LINEINDEX, LineNumber, 0) + CharNumber);end;procedure TForm1.Button1Click(Sender: TObj [阅读全文] [PDF]
使用时与一般的WinAPI相差不多, 以下有一个包装过的函式.(* MsgBox(提示文字, 标题, ID_Flat) 讯息视窗(* ============================================(* 第叁个引数的设定与本函数传回值, 请参阅 WinAPI 中对(* MessageBox 的说明(*(* Delphi 1.0(* ----------(* 本函数传入值为 Object Pascal 式的字串, 如果需(* 要传入 PChar 请直接呼叫 Application.MessageBox(*(* Delphi 2.0(* [阅读全文] [PDF]
unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,StdCtrls,ComCtrls,RichEdit,Shellapi; type TForm1=class(TForm) RichEdit1:TRichEdit; Button1:TButton; procedureFormCreate(Sender:TObject); private {Privatedeclarations} public {Publ [阅读全文] [PDF]
1 共6条 分1页
- flexsdk:使用 Flex SDK 实现一个 Facebook 相册
- silverlight:[Silverlight] 有关线程调用的扩展思路方法
- silverlight播放器:Silverlight专题(15) - 你自己的视频播放器的自定义MoveToPointSlider
- silverlight:Silverlight专题(14) - 基于Silverlight的Live Search图片搜索
- actionscript3.0:ActionScript 3.0 Step By Step系列文章
- actionscript3.0:ActionScript 3.0 Step By Step系列(一):工欲其善 先利其器(Flex Builder)
- actionscript3.0:ActionScript 3.0 Step By Step系列( 2):建立扎实的ActionScript 3.0语法基础
- actionscript:ActionScript 3.0 Step By Step系列( 3):学学流程控制 编编if-else & switch & while & for
- actionscript3.0:ActionScript 3.0 Step By Step系列( 4):来自面向对象开发的前的呐喊: 学会写可重用的代码
- actionscript3.0:ActionScript 3.0 Step By Step系列( 5):走在面向对象开发的路上 以类为基础去研究编程问题
- actionscript3.0:ActionScript 3.0 Step By Step系列( 6):学对象事件模型 从点击按扭开始
- actionscript3.0:ActionScript 3.0 Step By Step系列( 7):使用XML和XMLList类处理XML数据
- actionscript3.0:ActionScript 3.0 Step By Step系列( 8):动态的数据展现源于灵活的数据绑定
- actionscript3.0:ActionScript 3.0 Step By Step系列( 9):使用样式(style)和皮肤(Skin)两大画笔为应用程序界面画妆
- flex自定义组件:使用FLEX进行多文件上传和自定义上传信息
- flash图表:Flash图表(FusionChartsV3)的简单应用
- richtexteditor:Flex中如何控制鼠标移出RichTextEditor编辑范围外的时候隐藏其工具栏的例子
- flex自定义控件:Flex中如何利用textFieldStyleName样式自定义ColorPickerControl控件内文本风格的例子
- flex样式:Flex中如何利用swatchGridBackgroundColor样式设置ColorPicker的样本颜色网格背景颜色的例子
- colorpicker:Flex中如何利用swatchHighlightSize样式设置ColorPickerControl控件加亮边框粗细尺寸的例子