Howto Use TOpenDialog/fr
Deutsch · English · Español · Français · Polski · Slovenčina · Suomi · Русский · 日本語
Comment utiliser TOpenDialog
Procédure rapide :
1. Placer le composant OpenDialog sur votre fiche (n'importe où, puisqu'il ne sera pas visible).
Image:Component_Palette_Dialogs.png
(C'est le dialogue le plus à gauche sous dialogue.)2. Dans le code, écrire quelque chose comme :
var filename : string;
if OpenDialog1.Execute then
begin
filename := OpenDialog1.Filename;
ShowMessage(filename);
end;La méthode 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é.
La propriété Filename renvoie le nom de fichier complet incluant l'unité de disque et le chemin.
Voir aussi
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.