Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.03.06;
Скачать: CL | DM;

Вниз

Поиск текста   Найти похожие ветки 

 
Sonic_gd   (2005-02-21 11:11) [0]

Я ищу текст в TRichEdit данным способом:
procedure TMain.N38Click(Sender: TObject);
begin
with Find do begin
Options:=Options+[frHideMatchCase]+[frHideWholeWord]+[frHideUpDown];
Execute;
end;
end;

procedure TMain.FindFind(Sender: TObject);
var
FoundAt: LongInt;
StartPos, ToEnd: Integer;
begin
with text do  begin
{ begin the search after the current selection if there is one }
{ otherwise, begin at the start of the text }
if SelLength <> 0 then
StartPos := SelStart + SelLength
else
StartPos := 0;
{ ToEnd is the length from StartPos to the end of the text in the rich edit control }
ToEnd := Length(Text) - StartPos;
FoundAt := FindText(Find.FindText, StartPos, ToEnd, [stMatchCase]);
if FoundAt <> -1 then
begin
SetFocus;
SelStart := FoundAt;
SelLength := Length(Find.FindText);
end;
end;
end;

Но еслиискомый текст находится ниже видимой части текста, то текст не проручивается до нужной позиции. Как это сделать?


 
Sonic_gd   (2005-02-21 17:06) [1]

Если можно, то побыстрее. Это очень срочно.


 
Sonic_gd   (2005-02-21 17:38) [2]

Всё, уже сам разобрался.



Страницы: 1 вся ветка

Текущий архив: 2005.03.06;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.035 c
14-1108452249
Doxygen
2005-02-15 10:24
2005.03.06
Unix Mailbox


1-1108561665
SeDOy
2005-02-16 16:47
2005.03.06
Чтение файлов с изменяющейся структурой


1-1108998536
Leksey
2005-02-21 18:08
2005.03.06
Как удалить ненужный TabSheet из PageControl?


1-1108752260
allrussia
2005-02-18 21:44
2005.03.06
Как отобразить Form1 поверх Direct3D приложения


1-1109225593
Screamer
2005-02-24 09:13
2005.03.06
Длина символа