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
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Only allow pasting of shape layers?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  


3 Posts

Posted - Jul 02 2024 :  17:12:56  Show Profile  Reply
Is there a way to only allow pasting of shape layers in ImageEnView? I don't want users being to paste images. I don't want to disable the COPY/PASTE feature of ImageEnView. I just want to restrict to what can be paste.

Is there a way to do that?


38319 Posts

Posted - Jul 06 2024 :  22:13:55  Show Profile  Reply
Sorry, there is not an option for that at this time. You should override the copying yourself, i.e. if shape layers are selected call ImageEnView1.Proc.CopyToClipboard(); otherwise show an error.

Of course, that would still allow images to be pasted from other applications, so if you want to prevent that, intercept the pasting instead:
- Lock the TImageEnView from updating (ImageEnView1.LockUpdate)
- Call ImageEnView1.Proc.PasteFromClipboard();
- Check added layers are shapes, otherwise remove them
- Unlock the TImageEnView updating

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