How to assign procedure from custom unit to event handler control on main form
<p>Is it real?
For example, I have <code>form1</code> and <code>button1</code>. I can <strong>assign</strong> to <code>button1.onClick</code> in design time only<code>Button26Click</code>.</p>

<pre><code>  TForm1 = class(TForm)    
    procedure Button26Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
</code></pre>

<p>I also have unit 2 like :</p>

<pre><code>unit ProcAndFunc;
interface
uses sysutils,forms;

procedure createArrTable(Sender: TObject);
</code></pre>

<p>Can I <strong>assign</strong>  <code>createArrTable</code> to <code>button1.onClick</code> in <strong>design time</strong>?
Thanks.</p>

<p>Ok. Unit1</p>

<pre><code>TForm1 = class(TForm)  
        myButton1 : TButton; 
        procedure Button26Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
</code></pre>

<p>Unit2</p>

<pre><code>TForm2 = class(TForm) 
            myButton2 : TButton; 
            procedure ButtonClick(Sender: TObject);
          private
            { Private declarations }
          public
            { Public declarations }
          end;
</code></pre>

<p>Just to know how it works. What should I change in <code>unit2</code> that I can assign <code>ButtonClick</code> to <code>myButton1.OnClick</code> 
<a href="https://stackoverflow.com/questions/18240403/how-to-make-a-separate-unit-for-event-methods-which-ide-allows-me-to-assign-to">How to make a separate unit for event methods, which IDE allows me to assign to component events at design time?</a> It seems that I duplicate question. But that answer does not suit me. Is there the other way?</p>

<p>EDIT3 (08.08.2016): 
I created this TDataModule;</p>

<pre><code>unit Unit3;

interface

uses
  System.SysUtils, System.Classes,dialogs;

type
  TDataModule3 = class(TDataModule)
  procedure Click2(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DataModule3: TDataModule3;

implementation

{%CLASSGROUP 'Vcl.Controls.TControl'}

{$R *.dfm}

procedure TDataModule3.Click2(Sender: TObject);
begin
ShowMessage('hello world');
end;   

end.

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, unit3;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('hello world');
end;

end.
</code></pre>

<p>And I still cant assign DataModule3.Click2 to button1.onclick in design-time. (<a href="https://i.stack.imgur.com/H2lUx.png" rel="nofollow noreferrer">screenshot</a>). What do I also need to do?</p>