Sign in Join
Wiki copytemporary

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).

text
 Image:Component_Palette_Dialogs.png
 (C'est le dialogue le plus à gauche sous dialogue.)

2. Dans le code, écrire quelque chose comme :

pascal
   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.

Revision 2, last changed by WikiArchive .

Edited on wiki.freepascal.org by 6 people, 2007–2020

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
PaulatreidesNew page: {{Howto Use TOpenDialog}} Simple and short guideline: 1. Place the OpenDialog widget on your form (anyplace, since it will be not visible). (It is the left most dialog under Dialog) ...
Paulatreides
Paulatreides
Hispanaves
VincentText replace - "delphi>" to "syntaxhighlight>" (minor)
Gillou58
Gillou58
Gillou58
FTurtle
TrevFixed syntax highlighting (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.