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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 OpenImageEnDialog.FilterIndex
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
389 Posts

Posted - Oct 29 2023 :  08:12:32  Show Profile  Reply
Hello,
i use follow source code:

OpenImageEnDialog.InitialDir := load_dir;
OpenImageEnDialog.FileName := ofn;
OpenImageEnDialog.FilterIndex := open_filterindex;
if OpenImageEnDialog.execute then
begin
load_dir := extractfiledir(OpenImageEnDialog.FileName);
ofn := OpenImageEnDialog.FileName;
open_filterindex := OpenImageEnDialog.FilterIndex;
.....

when i open the first Image, the view is korrekt wit the last saved Filetype 'PSD'.
See here:


Now i wants open the next image, but the Filetype is no more 'PSD' ??

It's Image Files (*.jpeg;*.png;*.bmp;*.tif;*.gif...)


I select 'PNG' and load a PNG-File, this is OK


Now i wants open a new PNG_Image, but the Filetype is how befor
All Image Files (*.jpeg;*.png;*.bmp;*.tif;*.gif...) ????


Why it' not posible to preselect the last Filetype per set from
OpenImageEnDialog.FilterIndex := open_filterindex
With the laste file type.
What i doing wrong ?
Can anyone help me, with a little source for this.

Klaus
DigiFoto
www.klausdoege.de

xequte

38222 Posts

Posted - Oct 29 2023 :  20:11:21  Show Profile  Reply
Hi Klaus

You are better to use FilterDefault rather than FilterIndex:

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

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Oct 30 2023 :  11:01:36  Show Profile  Reply
Hi Nigel,

Thanks, I have that too already tried.
This is the Code:

OpenImageEnDialog.InitialDir := load_dir;
OpenImageEnDialog.FileName := ofn;
OpenImageEnDialog.FilterDefault := open_filterindex;
if OpenImageEnDialog.execute then
begin
load_dir := extractfiledir(OpenImageEnDialog.FileName);
ofn := OpenImageEnDialog.FileName;
open_filterindex := OpenImageEnDialog.FilterDefault;
.....

The result is the same.

I have now found an emergency solution.
If I set the OpenImageEnDialog.FileName := '',
then it works as it should.

Klaus
DigiFoto
www.klausdoege.de
Go to Top of Page

xequte

38222 Posts

Posted - Oct 31 2023 :  17:39:34  Show Profile  Reply
Hi Klaus

Sorry, I should have mentioned that setting filename will override FilterDefault (it will default to the extension of the passed filename).

Also, FilterDefault will override FilterIndex.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: