【发布时间】:2015-02-05 09:06:42
【问题描述】:
我正在使用 TRichEdit (Delphi XE2)。
有什么方法可以检查richedit 文本框是否包含受保护的文本?也是该受保护文本的起始位置,无需遍历整个文本。
目前我正在使用下面的代码
source.SelStart := charNo; //source is richedit name and charno is the
//iterating loop
source.SelLength := 1;
if (source.SelAttributes.Protected) then
当文本很大时,上面的代码执行需要很长时间。
这曾经在delphi 4中运行良好
有人能告诉我为什么相同的代码在 delphi XE2 中使用的时间更长,而在 Delphi 4 中使用的时间更少,这也是在 Delphi XE2 中执行此操作的正确方法吗?
【问题讨论】:
标签: delphi delphi-xe2 richedit delphi-4