Sign in Join
Wiki copytemporary

TFindDialog/fr: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**TFindDialog** ![](/wiki-images/9/9e/Tfinddialog.png) est un composant non visuel qui donne accès à une boîte de dialogue qui assiste dans la sélection d'un texte à rechercher. . Pour activer un FindDialog, il suffit d'appeler sa méthode `Execute()`. Créez ensuite un gestionnaire pour l'événement `OnFind` pour réaliser le code de recherche.
22
3-<figure>
4-<img src="component-TFindDialog.png" title="component-TFindDialog.png" />
5-<figcaption>component-TFindDialog.png</figcaption>
6-</figure>
3+![](/wiki-images/3/33/Component-TFindDialog.png)
74
85# Usage
96
107``` pascal
118procedure TMyForm.Button1Click(Sender: TObject);
129begin
1310 FindDialog1.Execute();
1411end;
1512
1613procedure TMyForm.FindDialog1Find(Sender: TObject);
1714var
1815 k: integer;
1916begin
2017 with Sender as TFindDialog do begin
2118 k := Pos( FindText, Memo1.Lines.Text );
2219 if k>0 then begin
2320 Memo1.Selstart := k;
2421 Memo1.SelLength := length( FindText );
2522 end else
2623 Beep();
2724 end;
2825end;
2926```
3027
3128# Voir aussi
3229
3330- [[doc:lcl/dialogs/tfinddialog.html|Doc. TFindDialog]]
3431- [[TReplaceDialog/fr|TReplaceDialog]]
3532
3633---
3734*From the Free Pascal wiki, page "TFindDialog/fr", as it stood on 2020-03-01 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history