Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.02 c
8-1081005582
новичок_из_сыктывкара
2004-04-03 19:19
2004.06.13
изменяя положение TTrackBar...


1-1086171807
Ruslan
2004-06-02 14:23
2004.06.13
Как преобразовать массив байт в строку?


14-1085716070
MBo
2004-05-28 07:47
2004.06.13
Пятница - значит, очередные задачки...


14-1085426948
тихий вовочка
2004-05-24 23:29
2004.06.13
Показуха


4-1083930798
Санёк
2004-05-07 15:53
2004.06.13
При переключении фокуса пропадает курсор мыши, как заставить Wind




   Наверх