title: onResize event with class object
body: <p>Here's is my code:</p>
  
  <pre><code>type TNav = class(TPanel)
  private
    procedure CMMouseEnter(var AMsg: TMessage); message CM_MOUSEENTER;
    procedure CMMouseLeave(var AMsg: TMessage); message CM_MOUSELEAVE;
  public
  end;
  
  type TForm1 = class(TForm)
    ...
    procedure FormCreate(Sender: TObject);
  private
  public
  end;
  
  procedure TForm1.FormCreate(Sender: TObject);
  begin
    with TNav.Create(Form1) do begin
      Parent := Self;
      Name := 'nav';
      Top := 0;
      Left := 0;
      Height := 27;
      Width := Form1.Width - 8;
      Visible := true;
      Caption := '';
    end;      
  end;
  
  procedure TNav.CMMouseEnter(var AMsg: TMessage);
  begin
    Self.Top := 0;
  end;
  
  procedure TNav.CMMouseLeave(var AMsg: TMessage);
  begin
    Self.Top := -23;
  end;
  </code></pre>
  
  <p>Is there a way to add an onResize event for my TNav, or even to send the width/height values from the Form1?</p>
  
  <p>Thank you in advance!</p>