unit uUploadFrame;

interface

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

type
  TUploadFrame = class(TFrame)
    bAction: TBitBtn;
    ProgressBar: TProgressBar;
    Edit: TEdit;
    lFileName: TLabel;
    procedure FrameResize(Sender: TObject);
  private
    { Private declarations }

    FGuidstring:string;

    procedure ArrangeElements;
    {<will arrange elements on the frame, on Resize it will also
    Arrange them if to put this to OnFrameResize
    }

  public
    { Public declarations }



    constructor Create(AOwner:TComponent); override;


    property Guidstring:string read FGuidstring write FGuidstring;

  end;

implementation

{$R *.dfm}

{ TUploadFrame }

procedure TUploadFrame.ArrangeElements;
begin

 ProgressBar.Left:=bAction.Left+bAction.Width+10;
 ProgressBar.Width:=Self.Width-ProgressBar.Left-20;


 Edit.Left:=bAction.Left+bAction.Width+10;
 Edit.Width:=Self.Width-Edit.Left-20;



 lFileName.Left:=bAction.Left+bAction.Width+10;
 lFileName.Width:=Self.Width-Edit.Left-20;

end;

constructor TUploadFrame.Create(AOwner: TComponent);
begin
  inherited;


  ArrangeElements;

end;

procedure TUploadFrame.FrameResize(Sender: TObject);
begin


ArrangeElements;

end;

end.
