Recent

Author Topic: RichText Search on Form2 Don't work.  (Read 271 times)

rodimus111

  • New member
  • *
  • Posts: 6
RichText Search on Form2 Don't work.
« on: June 09, 2019, 04:25:21 pm »
Someone knows why my Search dont work? I have two forms (form1 and form2). I need to do a search in a richtext from form1, pressing a button in form2.

procedure TForm2.Button1Click(Sender: TObject);
begin
   Form1.Button1.Caption:=inttostr(Form1.RichMemo1.Search('House', 0, 99999, [soMatchCase]));

end;

Strangely, this one does work.
   Form1.Button1.Caption:=inttostr(Form1.RichMemo1.Search('House', 0, 99999, []));

Wow Surprise!! If I add a Richtext1 in Form2, somatchcase works flawlesly!!
Why?


rodimus111

  • New member
  • *
  • Posts: 6
Re: RichText Search on Form2 Don't work.
« Reply #1 on: June 09, 2019, 04:40:36 pm »
I answer to myself.
I must include richmemo un uses in form2 to operate with all his atributes.