unit InputBox;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: InputBox
// Routine: Dialogs.InputBox

// BeginCode
{
This example displays an input dialog box when the user
clicks a button on the form. The input dialog box includes a
prompt string and a default string. The string the user enters
in the dialog box is stored in the InputString variable and
the text edit.
}

procedure TForm1.Button1Click(Sender: TObject);
var
  InputString: string;
begin
  InputString:= Dialogs.InputBox('Input Box', 'Prompt', 'Default string');
  Edit1.Text:= InputString;
end;
// EndCode
// EndExample: InputBox
end.
