How can you disable copying from using CTRL + C

How can you disable copying from form using CTRL + C or menu (Edit -> Copy)?

It's quite easy!
On the form you can override copy() method in following way:

public boolean copy()


    return true;

Comments (4)

  1. Mikael says:

    Why do you need to declare “ret”? It seems that you don’t use it…

  2. Sergiu says:

    Or you can overwrite the method task on form like this.

    public int task(int _taskId)
       int ret;
       if (!(_taskid == #taskCopy || _taskid == #taskCut))
           ret = super(_taskId);
       return ret;

  3. Yep, you’re right Mikael !

    I removed it!


Skip to main content