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
 TImageEnFolderMView: Selecting an image programmatically
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

862 Posts

Posted - Oct 09 2022 :  09:19:01  Show Profile  Reply
Please look at the small demo project:

When selecting an image by clicking with the mouse, the OnImageSelect event handler is automatically triggered.

But when I select an image PROGRAMMATICALLY, the OnImageSelect event handler is NOT automatically triggered!

So how can I select an image PROGRAMMATICALLY so that the OnImageSelect event handler is automatically triggered?

Or in other words: How can I get the FILENAME of the image I have selected before programmatically?

UPDATE:
ImageEnFolderMViewImages.ImageFileName[1]
does work in the context of this very simple demo. However, in a complex project where at the time when running this code the ImageEnFolderMView is hidden in a not visible CardPanel Card, it does not work. So getting the file name of an image regardless of any circumstances should always work.

attach/PeterPanino/202210991810_ImageEnFolderMViewSelect.zip
2.44 KB

xequte

38194 Posts

Posted - Oct 09 2022 :  20:21:39  Show Profile  Reply
Hi Peter

Events like OnImageSelect only occur on user actions, not for programmatic ones. You should call your own ImageSelect event after setting SelectedImage if you need that functionality.

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