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
 Action not working while ImageEnView is invisible

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 - Jul 06 2020 : 08:01:10
In the click-event-handler of a control which has no Action property I call a TImageEnViewPromptToOpen action:

ImageEnViewPromptToOpen1.Execute;


Unfortunately, this does not work while ImageEnView1.Visible = False.

The reason for ImageEnView1 being invisible at that time: ImageEnView1 is made visible only in a successive general processing step where an image file is being passed to the app.

Obviously, the ImageEnViewPromptToOpen1 action must pass the loaded file to ImageEnView1 through my custom routine, not by loading it implicitly in ImageEnView1.

So how can I execute the ImageEnViewPromptToOpen1 action while ImageEnView1 is still invisible?
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 06 2020 : 16:37:03
Hi Peter

That's correct. None of the TImageEnView actions will fire on an invisible or disabled control. You have found the best solution.



Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Jul 06 2020 : 08:23:25
I have found a better alternative:

ThisFile := ImageEnView1.IO.ExecuteOpenDialog();
if FileExists(ThisFile) then
  ProcessAFile(ThisFile);


This has the advantage that it works while ImageEnView1 is still invisible!