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
 OpenImageEnDialog.FilterIndex

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
klausdoege Posted - Oct 29 2023 : 08:12:32
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
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 31 2023 : 17:39:34
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
klausdoege Posted - Oct 30 2023 : 11:01:36
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
xequte Posted - Oct 29 2023 : 20:11:21
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