Howto Use TOpenDialog/fr: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## Comment utiliser TOpenDialog | |
| 2 | 2 | ||
| 3 | 3 | Procédure rapide : | |
| 4 | 4 | ||
| 5 | 5 | 1\. Placer le composant **OpenDialog** sur votre fiche (n'importe où, puisqu'il ne sera pas visible). | |
| 6 | 6 | ||
| 7 | - | ||
| 8 | - | ||
| 7 | + | ```text | |
| 8 | + | Image:Component_Palette_Dialogs.png | |
| 9 | + | (C'est le dialogue le plus à gauche sous dialogue.) | |
| 10 | + | ``` | |
| 9 | 11 | ||
| 10 | 12 | 2\. Dans le code, écrire quelque chose comme : | |
| 11 | 13 | ||
| 12 | 14 | ``` pascal | |
| 13 | 15 | var filename : string; | |
| 14 | 16 | ||
| 15 | 17 | if OpenDialog1.Execute then | |
| 16 | 18 | begin | |
| 17 | 19 | filename := OpenDialog1.Filename; | |
| 18 | 20 | ShowMessage(filename); | |
| 19 | 21 | end; | |
| 20 | 22 | ``` | |
| 21 | 23 | ||
| 22 | 24 | 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 | 25 | ||
| 24 | 26 | 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 | 27 | ||
| 26 | 28 | ## Voir aussi | |
| 27 | 29 | ||
| 28 | 30 | - [[Howto Use TSaveDialog/fr]] | |
| 29 | 31 | - [[Dialogs tab]] | |
| 30 | 32 | ||
| 31 | 33 | --- | |
| 32 | 34 | *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).* |
