SourceEdit

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:927KB
下载次数:30
上传日期:2007-07-14 15:48:05
上 传 者中国梦
说明:  这是一个有关文本编辑器的源程序,支持彩色语法,你可以任意修改,修改后发给我一份
(This is a text editor)

文件列表:
SourceEdit\SourceEdit\2ccc.com.txt (219, 2003-08-02)
SourceEdit\SourceEdit\MemoComponentUnit.dcu (88724, 2005-12-28)
SourceEdit\SourceEdit\MemoComponentUnit.pas (95760, 2002-06-28)
SourceEdit\SourceEdit\MyEdit\FindDlg.dcu (5290, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\FindDlg.ddp (51, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\FindDlg.dfm (4509, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\FindDlg.pas (1890, 2002-06-25)
SourceEdit\SourceEdit\MyEdit\FindDlg.~ddp (51, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\FindDlg.~dfm (4509, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\FindDlg.~pas (1890, 2002-06-25)
SourceEdit\SourceEdit\MyEdit\Project1.cfg (386, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Project1.dof (1397, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Project1.dpr (188, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Project1.exe (503808, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Project1.res (876, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Project1.~dpr (196, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\RtfExport.dcu (14744, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\RtfExport.dfm (328, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\RtfExport.pas (18939, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\RtfExport.~pas (18880, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.dcu (8971, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.ddp (51, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.dfm (8328, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.pas (4889, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.~ddp (51, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.~dfm (8328, 2002-07-23)
SourceEdit\SourceEdit\MyEdit\Unit1.~pas (5062, 2002-07-23)
SourceEdit\SourceEdit\MyEdit (0, 2003-09-06)
SourceEdit\SourceEdit\ObjList.dcu (18396, 2005-12-28)
SourceEdit\SourceEdit\ObjList.pas (19717, 2001-11-12)
SourceEdit\SourceEdit\RtfExport.dcu (15190, 2005-12-28)
SourceEdit\SourceEdit\RtfExport.pas (19194, 2002-07-25)
SourceEdit\SourceEdit\RtfExport.~pas (19194, 2002-07-25)
SourceEdit\SourceEdit\SourceEditUnit.dcu (67149, 2005-12-28)
SourceEdit\SourceEdit\SourceEditUnit.pas (70574, 2002-07-25)
SourceEdit\SourceEdit\SourceEditUnit.~pas (70385, 2002-07-25)
SourceEdit\SourceEdit\UtilsDos.dcu (22678, 2005-12-28)
SourceEdit\SourceEdit\UtilsDos.pas (19694, 2002-03-03)
SourceEdit\SourceEdit\UtilsSys.pas (552, 2000-01-27)
... ...

Source Editor Component ========================= for Borland Delphi 4 or later may work in lower versions as well Copyright (c) 2000 Sebastian Reichelt SebastianR@gmx.de TSourceEdit is a source editor control with several features that are useful for IDE programmers with Delphi knowledge. It is based on TMemoComponent, which is completely home-made from scratch. However, many useful properties and methods of TMemo have been implemented. All properties and methods should be self-explaining. If you have any questions concerning their usage, feel free to ask me. Note that you should use the property Text instead of Lines to access the whole text. To modify a piece of text at runtime, use the following code, or something similar: with TMCRange.Create (nil) do try Editor := MyComponent; // or whatever the name is RStart := S; // the first character REnd := E; // the last character; can be < S Text := NewText; // the new text; finally Free; end; Instead of RStart and REnd, you can also use StartRowCol, EndRowCol, and RLength. Line breaks are signaled by #13#10. You also can track positions in your code using ranges. If you do the following: MyRange := TMCRange.Create (MyComponent.TrackedRanges); with MyRange do begin RStart := S; REnd := E; OnOverwrite := MyOverwriteHandle; // optional end; then MyRange will always be updated when the text changes, so that you can easily jump to the correct position of an error, the definition of an identifier, or wherever you want. Just use: MyComponent.Selection.Assign (MyRange); and the range will be selected. For automatic saving and loading of TSyntaxColoring, a TSyntaxColoringCopy class has been created, whose instances can be passed to TStream.ReadComponent and TStream.WriteComponent. Note that TStream is an abstract class; use TMemoryStream instead. Then you can, for example, save your whole highlighting options in the registry. That's all I want to write for now. Happy programming! Sebastian Reichelt

近期下载者

相关文件


收藏者