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

Вниз

Глючит FindDialog   Найти похожие ветки 

 
Oyster ©   (2004-06-02 12:23) [0]

Вот пишу блокнот, там такой обработчик:

procedure TMainForm.ItemFindClick(Sender:TObject);
var s,MemoText:String;k,f:integer;
begin
  if FindDialog.Execute then
  begin
     if frMatchCase in FindDialog.Options then
     begin
        s:=FindDialog.FindText;
        MemoText:=TextArea.Text;
     end else
     begin
        s:=AnsiLowerCase(FindDialog.FindText);
        MemoText:=AnsiLowerCase(TextArea.Text);
     end;
     k:=TextArea.SelStart;
     Delete(MemoText,1,k);
     f:=Pos(s,MemoText);
     if f=0 then MessageBox(Application.Handle,
     PAnsiChar(s+" не найдено"),"Не найдено",
     MB_OK+MB_IconInformation) else
     begin
        TextArea.SelStart:=k+f-1;
        TextArea.SelLength:=Length(s);
        FindDialog.Execute;
     end;
  end;
end;

Так вот, когда выполняется первое Execute, прога не останавливается, а работает дальше, и выдает " не найдено.". А потом нажимаю "Найти далее", а оно не ищет. В чем проблема?


 
MetalFan ©   (2004-06-02 12:30) [1]


Occurs when the user clicks the Find Next button.

property OnFind: TNotifyEvent;

Description

Write an OnFind event handler to perform the requested search when the user clicks Find Next in the dialog. Use the Options flags to determine how the search is conducted.

доходит, что нужно делать?


 
Oyster ©   (2004-06-02 12:33) [2]

Спасибо, дошло :)



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

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

Наверх




Память: 0.47 MB
Время: 0.037 c
3-1085377266
leonidus
2004-05-24 09:41
2004.06.13
Как быть если у человека не установлен BDE а СУБД должна работать


3-1085137978
DelphiNew
2004-05-21 15:12
2004.06.13
Поиск поля


4-1083828566
Dmitrij_K
2004-05-06 11:29
2004.06.13
Имя пользователя


3-1085032891
Alex_x
2004-05-20 10:01
2004.06.13
технология доступа в MIDAS?


4-1083989471
-=DoN=-
2004-05-08 08:11
2004.06.13
Account information