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
 Action not working while ImageEnView is invisible
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Jul 06 2020 :  08:01:10  Show Profile  Reply
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?

PeterPanino

933 Posts

Posted - Jul 06 2020 :  08:23:25  Show Profile  Reply
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!
Go to Top of Page

xequte

38610 Posts

Posted - Jul 06 2020 :  16:37:03  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: