InputBox (Delphi)
Description
This example displays an input dialog box when you click a button on the form. The input dialog box includes a prompt string and a default string. The string you enter in the dialog box is stored in the InputString variable and the text edit.
Code
procedure TForm1.Button1Click(Sender: TObject);
var
InputString: string;
begin
InputString:= Dialogs.InputBox('Input Box', 'Prompt', 'Default string');
Edit1.Text:= InputString;
end;
Uses
- Vcl.Dialogs.InputBox ( fr | de | ja )