Howto Use TOpenDialog/fr: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Howto Use TOpenDialog/fr
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## Comment utiliser TOpenDialog | |
| 2 | + | ||
| 3 | + | Procédure rapide : | |
| 4 | + | ||
| 5 | + | 1\. Placer le composant **OpenDialog** sur votre fiche (n'importe où, puisqu'il ne sera pas visible). | |
| 6 | + | ||
| 7 | + | ` `\ | |
| 8 | + | ` (C'est le dialogue le plus à gauche sous dialogue.)` | |
| 9 | + | ||
| 10 | + | 2\. Dans le code, écrire quelque chose comme : | |
| 11 | + | ||
| 12 | + | ``` pascal | |
| 13 | + | var filename : string; | |
| 14 | + | ||
| 15 | + | if OpenDialog1.Execute then | |
| 16 | + | begin | |
| 17 | + | filename := OpenDialog1.Filename; | |
| 18 | + | ShowMessage(filename); | |
| 19 | + | end; | |
| 20 | + | ``` | |
| 21 | + | ||
| 22 | + | La méthode [[doc:lcl/dialogs/tcommondialog.execute.html|Execute]] montre la boîte de dialogue d'ouverture de fichiers. Elle renvoie **True** quand l'utilisateur a sélectionné un fichier, **False** quand le choix a échoué. | |
| 23 | + | ||
| 24 | + | La propriété [[doc:lcl/dialogs/tfiledialog.filename.html|Filename]] renvoie le nom de fichier complet incluant l'unité de disque et le chemin. | |
| 25 | + | ||
| 26 | + | ## Voir aussi | |
| 27 | + | ||
| 28 | + | - [[Howto Use TSaveDialog/fr]] | |
| 29 | + | - [[Dialogs tab]] | |
| 30 | + | ||
| 31 | + | --- | |
| 32 | + | *From the Free Pascal wiki, page "Howto Use TOpenDialog/fr", as it stood on 2020-02-17 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).* |
