ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 OpenImageEnDialog1.Execute and the filter setting

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Piet Posted - Aug 07 2013 : 22:55:27
Hello
I use this code:
if OpenImageEnDialog1.Execute then ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName) else exit;
Problem:
No matter what I do to the filter settings, the dialog opens with jpg only.

This method opens with the common graphics as a filter and is therefore good:
with ImageEnView1.IO do LoadFromFile(ExecuteOpenDialog('','',true,0,'') );
Problem:
I cannot, or do not know how to apply the "if..then..else exit;

Any help on forcing the filter or applying the i-then statement?
Thanks
Piet

Piet Henning
www.pHenning.co.za
4   L A T E S T    R E P L I E S    (Newest First)
Piet Posted - Aug 08 2013 : 19:43:11
Thanks Nigel,
the combination AutoSetfilter=false, Filterdefault=-1 and FilterIndex=1 did the trick.

Piet Henning
www.pHenning.co.za
xequte Posted - Aug 08 2013 : 18:33:04
Sorry I may have misunderstood you, are you saying that you have a complete filter (File of Type has all the various types), but it defaults to JPEG?

To have it default to all common image types set FilterDefault to -1 (= no selected type) and FilterIndex to 1 (first item is selected).

You can also use TImageEnIO.ExecuteOpenDialog as follows:

sFilename := ImageEnView1.IO.ExecuteOpenDialog('', '', false);
if sFilename <> '' then
  ImageEnView1.IO.LoadFromFile(sFilename);


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Piet Posted - Aug 08 2013 : 09:22:57
Hello Nigel,
I had it true, then false. I have have set the DefaultFilter to 0, to 1, to -1. Nothing changes.
I have set the FilterIndex to 0, 1, and -1. Nothing changes.

If I click the dropbox, the filters are listed exactly as they are in the filter edit edit feature.


Piet Henning
www.pHenning.co.za
xequte Posted - Aug 08 2013 : 03:56:51
Hi Piet

Is TOpenImageEnDialog.AutoSetFilter set to true?

http://www.imageen.com/help/TOpenImageEnDialog.AutoSetFilter.html


If you click the down button on the file type box, what is exactly is listed?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com