Solved

Allow only picture files in OpenDialog

Posted on 2004-04-27
3
237 Views
Last Modified: 2010-04-05
Hi,

how can I set an OpenDialog to only accept picture files? The OpenDialog should only allow to open .bmp and .jpg files.
When I set the DefaultExt nothing happens...


thanks
0
Comment
Question by:Bohne
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 50 total points
ID: 10930855
1. You can use OpenPictureDialog
or
2. You should set property
Filter := All (*.*)|*.*|JPEG Image File (*.jpg)|*.jpg|JPEG Image File (*.jpeg)|*.jpeg|Bitmaps (*.bmp)|*.bmp;
0
 
LVL 17

Expert Comment

by:mokule
ID: 10930867
DefultExt property is for adding extension to a file name when entered without extension and period.
0
 
LVL 2

Expert Comment

by:Deti
ID: 10931492
Just write that String with mokule wrote in OpenDialog Filter.. in Object Inspector..
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 219
Virtuailstring tree add node to another virtuailstring tree list 4 115
Run video youtube webbrowse 10 62
LAN or WAN ? 11 91
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question