Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Button im opendialog (https://www.delphipraxis.net/3986-button-im-opendialog.html)

~Freeze~ 10. Apr 2003 10:33


Button im opendialog
 
Hallo

wie kann ich ermitteln welcher Button ("ok" oder "abbrechen") im Opendialog gedrückt wurde??

Besten Dank für jede Hilfe!

Sebastian Nintemann 10. Apr 2003 10:43

Hallo ~Freeze~

Zitat:

Zitat von Delphi OH
Description

Execute opens the file-selection dialog, returning true when the user selects a file and clicks Open. If the user clicks Cancel, Execute returns false.
Delphi-Quellcode:
if OpenDialog1.Execute then

  Memo1.Lines.LoadFromFile(OpenDialog1.FileName)
else

  Memo1.Lines.Clear;

Ich denke das Beispiel sagt alles, prüfe einfach mit einer if-Bedingung ob Opendialog.Execute true oder false liefert.

Gruß, Sebastian


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz