unit UnitFrameACPopup;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, UnitFramePopup,
  Dialogs;

type
  TFrameACPopup = class(TFrame)
  private
    { Private declarations }
    ac : TACPopup;
  public
    { Public declarations }
        constructor Create(AOwner : TComponent); override;
        procedure ShowPopup(X,Y : integer);
        procedure AutoPopulate;
  end;

implementation

uses UnitFrmMainPopup;



{$R *.dfm}

{ TFrameACPopup }

procedure TFrameACPopup.AutoPopulate;
begin
    ac.AutoPopulate;
end;

constructor TFrameACPopup.Create(AOwner: TComponent);

begin
    inherited;
    self.parentwindow := application.Handle;
    
    ac := TACPopup.create(aowner);
    ac.Parent := self;


end;

procedure TFrameACPopup.ShowPopup(X, Y: integer);
begin

    //self.Show;
    ac.ShowPopup(x,y);
    //self.Hide;
end;

end.
