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
 Enable Paste function in TImageEnMView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

133 Posts

Posted - Jul 19 2019 :  14:15:28  Show Profile  Reply
Please, could you list up the single steps I've to add to project + code in order to enable Paste for TImageEnMView?

Thank you,
Al

aleatprog

133 Posts

Posted - Jul 19 2019 :  14:25:38  Show Profile  Reply
Just for explanation, I added a button with the following code:

if ImageEnMView.Proc.CanPasteFromClipboard then
begin
ImageEnMView.AppendImage(0, 0);
ImageEnMView.Proc.PasteFromClipboard(iecpAuto, True, True, False);
end;

which works perfectly. But I like to have Paste support without the usage of a button or menu, like it is in the Demo.

Adding "iexActionsMulti" to "uses" or "PasteFromClipboard: TImageEnMViewPasteFromClipboard;" as variable doesn't work.
Go to Top of Page

xequte

38611 Posts

Posted - Jul 20 2019 :  01:36:34  Show Profile  Reply
Hi

Either watch for ssCtrl + VK_V in TImageEnView.OnKeyUp and then call your paste code.

Or add a TActionList component to your form and add TImageEnMViewPasteFromClipboard to it.



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

aleatprog

133 Posts

Posted - Jul 20 2019 :  03:27:40  Show Profile  Reply
Thank you for reply, Nigel.

Indeed, the above code is an action connected to a button, but I forgot the shortcut option inside the action properties. To get the desired behaviour it is sufficient specifying Ctrl+V as shortcut for the action.

In fact, I see only now that in your demo the action is connected to the shortcut Ctrl+V, too.

Al
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: