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
 TImageEnFolderMView: Selecting an image programmatically

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
PeterPanino Posted - Oct 09 2022 : 09:19:01
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 09 2022 : 20:21:39
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