Lazarus

Programming => Packages and Libraries => RichMemo => Topic started by: rodimus111 on June 09, 2019, 04:25:21 pm

Title: RichText Search on Form2 Don't work.
Post by: rodimus111 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?

Title: Re: RichText Search on Form2 Don't work.
Post by: rodimus111 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.
TinyPortal © 2005-2018