Source Editor Component
=========================
for Borland Delphi 4 or later
may work in lower versions as well
Copyright (c) 2000 Sebastian Reichelt
[email protected]
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
没有合适的资源?快使用搜索试试~ 我知道了~
Delphi SourceEdit 源代码,修正调整支持Delphi11
共74个文件
pas:11个
dcu:8个
~pas:7个
需积分: 10 1 下载量 73 浏览量
2022-10-14
09:59:54
上传
评论
收藏 1.03MB RAR 举报
温馨提示
s
资源详情
资源评论
资源推荐
收起资源包目录
SourceEditForD11.rar (74个子文件)
SourceEditD11Apps.groupproj 2KB
MemoComponentUnit.~pas 94KB
2ccc.com.txt 219B
Readme.txt 2KB
ObjList.pas 19KB
Test
__history
Project1.dpr.~1~ 234B
Unit1.dfm.~7~ 726B
Unit1.pas.~1~ 361B
Unit1.dfm.~4~ 494B
Unit1.pas.~7~ 1KB
Unit1.dfm.~2~ 357B
Unit1.dfm.~6~ 726B
Unit1.pas.~10~ 1KB
Unit1.dfm.~1~ 305B
Unit1.pas.~6~ 836B
Unit1.pas.~9~ 1KB
Unit1.pas.~8~ 1KB
Unit1.dfm.~5~ 725B
Unit1.pas.~2~ 723B
Unit1.pas.~5~ 775B
Unit1.pas.~3~ 762B
Unit1.dfm.~3~ 494B
Unit1.pas.~4~ 752B
DebugProj.dpr 435B
DebugProj.dproj.local 2KB
Unit1.dfm 747B
__recovery
DebugProj.dproj 50KB
Unit1.pas 2KB
DebugProj.res 110KB
RtfExport.~pas 19KB
MemoComponentUnit.pas 94KB
SourceEditD11.dproj.local 956B
SourceEditD11.dproj 49KB
RtfExport.pas 19KB
SourceEditUnit.pas 69KB
SourceEditD11.bpl 2.71MB
SourceEditD11.res 664B
UtilsWin.pas 4KB
MyEdit
FindDlg.dcu 5KB
Project1.~dpr 196B
FindDlg.ddp 51B
FindDlg.dfm 4KB
Project1.exe 498KB
Project1.res 876B
FindDlg.pas 2KB
FindDlg.~dfm 4KB
Unit1.~dfm 8KB
RtfExport.~pas 18KB
Unit1.dfm 8KB
Unit1.ddp 51B
Project1.cfg 386B
RtfExport.pas 18KB
Unit1.pas 5KB
RtfExport.dfm 328B
RtfExport.dcu 15KB
Unit1.~ddp 51B
Project1.dpr 188B
Project1.dof 1KB
Unit1.~pas 5KB
Unit1.dcu 9KB
FindDlg.~pas 2KB
FindDlg.~ddp 51B
SourceEditUnit.dcu 64KB
UtilsSys.pas 552B
RtfExport.dcu 16KB
SourceEditD11Apps.groupproj.local 227B
SourceEditD11.identcache 216B
UtilsDos.dcu 22KB
UtilsDos.pas 19KB
UtilsDos.~pas 19KB
SourceEditD11.dpk 840B
ObjList.dcu 20KB
SourceEditUnit.~pas 69KB
MemoComponentUnit.dcu 85KB
共 74 条
- 1
Ti-蜗牛
- 粉丝: 5
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0