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
 Intercept the image-loading process?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

859 Posts

Posted - Mar 03 2021 :  11:41:22  Show Profile  Reply
I need to take a specific action when ImageEnView loads a specific image type:

• The path and file-name/extension must be known
• The action must be taken BEFORE the image is effectively loaded in ImageEnView
• It must be possible to abort the loading of the image

I have researched several approaches:

• ImageEnView.OnImageLoaded: As the name says, it probably occurs AFTER the image has been effectively loaded. And there is no way to get the image details and to abort the loading.
• Clicking on the ImageEn Load toolbar-button: Same problem as above. And the OnActionExecute occurs AFTER OnFinishWork.
• OnImageChangeEx: Occurs AFTER

Any idea?

PeterPanino

859 Posts

Posted - Mar 04 2021 :  04:49:45  Show Profile  Reply
Confirmed: ImageEnView.OnActionExecute with Sender is TImageEnViewPromptToOpen occurs AFTER the image is already loaded and DISPLAYED!

I need to intercept TImageEnViewPromptToOpen.OnExecute when the user clicks the OPEN toolbar-button BEFORE the image is loaded!
Go to Top of Page

xequte

38176 Posts

Posted - Mar 07 2021 :  19:59:25  Show Profile  Reply
Hi Peter

Unfortunately, at this time there is no way around that. By design, OnActionExecute occurs AFTER the action has completed (to allow user to apply UI changes). There is no before action event.

At some point we will allow custom items on the toolbar. In the meantime I think you would be better to craft your own toolbar.



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

PeterPanino

859 Posts

Posted - Mar 13 2021 :  15:56:08  Show Profile  Reply
Would it be possible to implement an additional OnBeforeActionExecute event to get the file name BEFORE the file is loaded?
Go to Top of Page

xequte

38176 Posts

Posted - Mar 14 2021 :  01:13:26  Show Profile  Reply
Hi Peter

This will be possible in 10.0 using TImageEnToolbar.OnActionExecute.

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